From 7a6e0d968dbacbc9e59a2e204f55daf315709c7d Mon Sep 17 00:00:00 2001 From: lancebord Date: Tue, 3 Mar 2026 11:59:19 -0500 Subject: deatch head for tagged --- src/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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."); -- cgit v1.2.3-59-g8ed1b