mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
fix: Display all parents even if there are more then 2 (#583)
This commit is contained in:
parent
67b6a6d9d5
commit
bb6ceb03b9
2 changed files with 2 additions and 18 deletions
|
@ -112,15 +112,7 @@ namespace SourceGit.Commands
|
||||||
if (data.Length < 8)
|
if (data.Length < 8)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var idx = data.IndexOf(' ', StringComparison.Ordinal);
|
_current.Parents.AddRange(data.Split(separator: ' ', options: StringSplitOptions.RemoveEmptyEntries));
|
||||||
if (idx == -1)
|
|
||||||
{
|
|
||||||
_current.Parents.Add(data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_current.Parents.Add(data.Substring(0, idx));
|
|
||||||
_current.Parents.Add(data.Substring(idx + 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MarkFirstMerged()
|
private void MarkFirstMerged()
|
||||||
|
|
|
@ -73,15 +73,7 @@ namespace SourceGit.Commands
|
||||||
if (data.Length < 8)
|
if (data.Length < 8)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var idx = data.IndexOf(' ', StringComparison.Ordinal);
|
_current.Commit.Parents.AddRange(data.Split(separator: ' ', options: StringSplitOptions.RemoveEmptyEntries));
|
||||||
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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Models.CommitWithMessage> _commits = new List<Models.CommitWithMessage>();
|
private List<Models.CommitWithMessage> _commits = new List<Models.CommitWithMessage>();
|
||||||
|
|
Loading…
Reference in a new issue