Skip to content

Commit a899de2

Browse files
committed
enhance: ignore refs/*/HEAD when query refs those contains given commit
1 parent 31ad317 commit a899de2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Commands/QueryRefsContainsCommit.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public QueryRefsContainsCommit(string repo, string commit)
2323
var lines = output.StdOut.Split('\n');
2424
foreach (var line in lines)
2525
{
26+
if (line.EndsWith("/HEAD", StringComparison.Ordinal))
27+
continue;
28+
2629
if (line.StartsWith("refs/heads/", StringComparison.Ordinal))
2730
rs.Add(new() { Name = line.Substring("refs/heads/".Length), Type = Models.DecoratorType.LocalBranchHead });
2831
else if (line.StartsWith("refs/remotes/", StringComparison.Ordinal))

0 commit comments

Comments
 (0)