enhance: ignore refs/*/HEAD when query refs those contains given commit

This commit is contained in:
leo 2024-12-18 17:50:19 +08:00
parent 31ad317a57
commit a899de2b98
No known key found for this signature in database

View file

@ -23,6 +23,9 @@ namespace SourceGit.Commands
var lines = output.StdOut.Split('\n');
foreach (var line in lines)
{
if (line.EndsWith("/HEAD", StringComparison.Ordinal))
continue;
if (line.StartsWith("refs/heads/", StringComparison.Ordinal))
rs.Add(new() { Name = line.Substring("refs/heads/".Length), Type = Models.DecoratorType.LocalBranchHead });
else if (line.StartsWith("refs/remotes/", StringComparison.Ordinal))