mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
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:
committed by
Lorenz Leutgeb
parent
c4cc462483
commit
8501e56345
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user