aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar lancebord 2026-03-03 11:59:19 -0500
committerGravatar lancebord 2026-03-03 11:59:19 -0500
commit7a6e0d968dbacbc9e59a2e204f55daf315709c7d (patch)
treeb244f77ca3b1917ad2dcf529e41f65fdf99086d6 /src
parenttagged and none update (diff)
deatch head for tagged
Diffstat (limited to 'src')
-rw-r--r--src/util.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.rs b/src/util.rs
index 5394fb0..9a75111 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -174,8 +174,8 @@ pub fn pull_latest_tag(path: &Path) -> Result<(), git2::Error> {
if analysis.is_fast_forward() {
let refname = format!("refs/heads/{}", branch);
let mut reference = repo.find_reference(&refname)?;
- reference.set_target(latest_commit.id(), "Fast-Forward to latest tag")?;
- repo.set_head(&refname)?;
+ reference.set_target(latest_commit.id(), "set to latest tag")?;
+ repo.set_head_detached(latest_commit.id())?;
repo.checkout_head(Some(CheckoutBuilder::default().force()))?;
} else if !analysis.is_up_to_date() {
println!("Cannot fast-forward to latest tag.");