Skip to content

Commit

Permalink
Don't peel references - this would resolve remotes/origin/HEAD to …main…
Browse files Browse the repository at this point in the history
…leading to it being displayed twice.
  • Loading branch information
Byron committed Apr 1, 2022
1 parent d3d20ed commit eb753f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/info/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,9 @@ impl<'a> Repo<'a> {
.repo
.references()?
.all()?
.peeled()
.filter_map(Result::ok)
.filter_map(|reference: git::Reference<'_>| {
(reference.id() == head_oid
(reference.target().try_id() == Some(&head_oid)
&& reference.name().category() != Some(git::reference::Category::Tag))
.then(|| reference.name().shorten().to_string())
})
Expand Down

0 comments on commit eb753f9

Please sign in to comment.