mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
feature: add a button in diff view to ignore all whitespace changes (--ignore-all-space)
This commit is contained in:
parent
c1f6da1b31
commit
d2a005c532
10 changed files with 44 additions and 17 deletions
|
@ -12,7 +12,7 @@ namespace SourceGit.Commands
|
|||
private const string PREFIX_LFS_DEL = "-version https://git-lfs.github.com/spec/";
|
||||
private const string PREFIX_LFS_MODIFY = " version https://git-lfs.github.com/spec/";
|
||||
|
||||
public Diff(string repo, Models.DiffOption opt, int unified)
|
||||
public Diff(string repo, Models.DiffOption opt, int unified, bool ignoreWhitespace)
|
||||
{
|
||||
_result.TextDiff = new Models.TextDiff()
|
||||
{
|
||||
|
@ -22,7 +22,11 @@ namespace SourceGit.Commands
|
|||
|
||||
WorkingDirectory = repo;
|
||||
Context = repo;
|
||||
Args = $"diff --ignore-cr-at-eol --unified={unified} {opt}";
|
||||
|
||||
if (ignoreWhitespace)
|
||||
Args = $"diff --ignore-cr-at-eol --ignore-all-space --unified={unified} {opt}";
|
||||
else
|
||||
Args = $"diff --ignore-cr-at-eol --unified={unified} {opt}";
|
||||
}
|
||||
|
||||
public Models.DiffResult Result()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue