Skip to content

Commit 7de831f

Browse files
committed
code_style: checking order while parsing header line
Although the position of this line of code will not affect the final result no matter where it is placed, its position should still be adjusted for easier understanding. Signed-off-by: leo <longshuang@msn.cn>
1 parent 36472be commit 7de831f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Commands/Diff.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ private void ParseDiffHeaderLine(string line)
145145
if (line.StartsWith(SPECIAL_DIFF_START, StringComparison.Ordinal))
146146
return;
147147

148-
if (line.StartsWith(SPECIAL_BINARY, StringComparison.Ordinal))
149-
_result.IsBinary = true;
150-
151148
if (ParseFileModeChange(line))
152149
return;
153150

@@ -159,6 +156,9 @@ private void ParseDiffHeaderLine(string line)
159156
_result.NewHash = match.Groups[2].Value;
160157
return;
161158
}
159+
160+
if (line.StartsWith(SPECIAL_BINARY, StringComparison.Ordinal))
161+
_result.IsBinary = true;
162162
}
163163

164164
private bool ParseChunkStartLine(string line)

0 commit comments

Comments
 (0)