File tree Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -112,15 +112,7 @@ private void ParseParent(string data)
112112 if ( data . Length < 8 )
113113 return ;
114114
115- var idx = data . IndexOf ( ' ' , StringComparison . Ordinal ) ;
116- if ( idx == - 1 )
117- {
118- _current . Parents . Add ( data ) ;
119- return ;
120- }
121-
122- _current . Parents . Add ( data . Substring ( 0 , idx ) ) ;
123- _current . Parents . Add ( data . Substring ( idx + 1 ) ) ;
115+ _current . Parents . AddRange ( data . Split ( separator : ' ' , options : StringSplitOptions . RemoveEmptyEntries ) ) ;
124116 }
125117
126118 private void MarkFirstMerged ( )
Original file line number Diff line number Diff line change @@ -73,15 +73,7 @@ private void ParseParent(string data)
7373 if ( data . Length < 8 )
7474 return ;
7575
76- var idx = data . IndexOf ( ' ' , StringComparison . Ordinal ) ;
77- if ( idx == - 1 )
78- {
79- _current . Commit . Parents . Add ( data ) ;
80- return ;
81- }
82-
83- _current . Commit . Parents . Add ( data . Substring ( 0 , idx ) ) ;
84- _current . Commit . Parents . Add ( data . Substring ( idx + 1 ) ) ;
76+ _current . Commit . Parents . AddRange ( data . Split ( separator : ' ' , options : StringSplitOptions . RemoveEmptyEntries ) ) ;
8577 }
8678
8779 private List < Models . CommitWithMessage > _commits = new List < Models . CommitWithMessage > ( ) ;
You can’t perform that action at this time.
0 commit comments