Skip to content

Commit

Permalink
Introduce optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentkempe committed Aug 25, 2018
1 parent f42936b commit f160567
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions GitDiffMargin/Git/GitDiffParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ public class GitDiffParser
private readonly string _gitDiff;
private readonly bool _suppressRollback;

public GitDiffParser(string gitDiff, int contextLines)
: this(gitDiff, contextLines, false)
{
}

public GitDiffParser(string gitDiff, int contextLines, bool suppressRollback)
public GitDiffParser(string gitDiff, int contextLines, bool suppressRollback = false)
{
_gitDiff = gitDiff;
_contextLines = contextLines;
Expand Down
7 changes: 1 addition & 6 deletions GitDiffMargin/Git/HunkRangeInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ namespace GitDiffMargin.Git
{
public class HunkRangeInfo
{
public HunkRangeInfo(HunkRange originaleHunkRange, HunkRange newHunkRange, IEnumerable<string> diffLines)
: this(originaleHunkRange, newHunkRange, diffLines, false)
{
}

public HunkRangeInfo(HunkRange originaleHunkRange, HunkRange newHunkRange, IEnumerable<string> diffLines,
bool suppressRollback)
bool suppressRollback = false)
{
OriginalHunkRange = originaleHunkRange;
NewHunkRange = newHunkRange;
Expand Down

0 comments on commit f160567

Please sign in to comment.