remote-helper: Peel pushed tags for explorer URL

- Use the tagged commit for the tree URL, not the tag object
- Print no URL if the ref does not point to a commit
This commit is contained in:
Daniel Norman
2026-10-08 12:43:42 +02:00
committed by Lorenz Leutgeb
parent c4cc462483
commit 8501e56345
+11 -1
View File
@@ -850,7 +850,17 @@ where
patch_merge_all(old, head, dst, working, &mut patches, signer, &identity)?;
}
}
Ok(Some(ExplorerResource::Tree { oid: head }))
// Annotated tags point to a tag object, but the explorer can only show
// the tree of a commit.
let resource = working
.find_object(head.into(), None)?
.peel_to_commit()
.ok()
.map(|commit| ExplorerResource::Tree {
oid: commit.id().into(),
});
Ok(resource)
}
/// Revert all patches that are no longer included in the base branch.