Skip to content

Commit 04e0440

Browse files
committed
Inline helper methods to simplify refactoring
1 parent 4bda9ff commit 04e0440

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

LibGit2Sharp/TreeChanges.cs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,17 @@ private void AddLineChange(FilePath currentFilePath, GitDiffLineOrigin lineOrigi
6868
switch (lineOrigin)
6969
{
7070
case GitDiffLineOrigin.GIT_DIFF_LINE_ADDITION:
71-
IncrementLinesAdded(currentFilePath);
71+
linesAdded++;
72+
this[currentFilePath].LinesAdded++;
7273
break;
7374

7475
case GitDiffLineOrigin.GIT_DIFF_LINE_DELETION:
75-
IncrementLinesDeleted(currentFilePath);
76+
linesDeleted++;
77+
this[currentFilePath].LinesDeleted++;
7678
break;
7779
}
7880
}
7981

80-
private void IncrementLinesDeleted(FilePath filePath)
81-
{
82-
linesDeleted++;
83-
this[filePath].LinesDeleted++;
84-
}
85-
86-
private void IncrementLinesAdded(FilePath filePath)
87-
{
88-
linesAdded++;
89-
this[filePath].LinesAdded++;
90-
}
91-
9282
private void AddFileChange(GitDiffDelta delta)
9383
{
9484
var newFilePath = FilePathMarshaler.FromNative(delta.NewFile.Path);

0 commit comments

Comments
 (0)