fix: Display all parents even if there are more then 2 (#583)

This commit is contained in:
Dmitrij D. Czarkoff 2024-10-21 07:38:30 +00:00 committed by GitHub
parent 67b6a6d9d5
commit bb6ceb03b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 18 deletions

View file

@ -112,15 +112,7 @@ namespace SourceGit.Commands
if (data.Length < 8)
return;
var idx = data.IndexOf(' ', StringComparison.Ordinal);
if (idx == -1)
{
_current.Parents.Add(data);
return;
}
_current.Parents.Add(data.Substring(0, idx));
_current.Parents.Add(data.Substring(idx + 1));
_current.Parents.AddRange(data.Split(separator: ' ', options: StringSplitOptions.RemoveEmptyEntries));
}
private void MarkFirstMerged()

View file

@ -73,15 +73,7 @@ namespace SourceGit.Commands
if (data.Length < 8)
return;
var idx = data.IndexOf(' ', StringComparison.Ordinal);
if (idx == -1)
{
_current.Commit.Parents.Add(data);
return;
}
_current.Commit.Parents.Add(data.Substring(0, idx));
_current.Commit.Parents.Add(data.Substring(idx + 1));
_current.Commit.Parents.AddRange(data.Split(separator: ' ', options: StringSplitOptions.RemoveEmptyEntries));
}
private List<Models.CommitWithMessage> _commits = new List<Models.CommitWithMessage>();