mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
enhance: ignore refs/*/HEAD
when query refs those contains given commit
This commit is contained in:
parent
31ad317a57
commit
a899de2b98
1 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,9 @@ namespace SourceGit.Commands
|
||||||
var lines = output.StdOut.Split('\n');
|
var lines = output.StdOut.Split('\n');
|
||||||
foreach (var line in lines)
|
foreach (var line in lines)
|
||||||
{
|
{
|
||||||
|
if (line.EndsWith("/HEAD", StringComparison.Ordinal))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (line.StartsWith("refs/heads/", StringComparison.Ordinal))
|
if (line.StartsWith("refs/heads/", StringComparison.Ordinal))
|
||||||
rs.Add(new() { Name = line.Substring("refs/heads/".Length), Type = Models.DecoratorType.LocalBranchHead });
|
rs.Add(new() { Name = line.Substring("refs/heads/".Length), Type = Models.DecoratorType.LocalBranchHead });
|
||||||
else if (line.StartsWith("refs/remotes/", StringComparison.Ordinal))
|
else if (line.StartsWith("refs/remotes/", StringComparison.Ordinal))
|
||||||
|
|
Loading…
Reference in a new issue