Skip to content

Commit 9d13de3

Browse files
committed
Diff-View: Honor whitespace preference
This honors the preferences for showing differences in whitespacing when using diff between single revisions/branches. Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
1 parent caa0806 commit 9d13de3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

PBDiffWindowController.m

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import "PBDiffWindowController.h"
1010
#import "PBGitRepository.h"
1111
#import "PBGitCommit.h"
12+
#import "PBGitDefaults.h"
1213

1314

1415
@implementation PBDiffWindowController
@@ -34,6 +35,10 @@ + (void) showDiffWindowWithFiles:(NSArray *)filePaths fromCommit:(PBGitCommit *)
3435

3536
NSString *commitSelector = [NSString stringWithFormat:@"%@..%@", [startCommit realSha], [diffCommit realSha]];
3637
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"diff", commitSelector, nil];
38+
39+
if (![PBGitDefaults showWhitespaceDifferences])
40+
[arguments insertObject:@"-w" atIndex:1];
41+
3742
if (filePaths) {
3843
[arguments addObject:@"--"];
3944
[arguments addObjectsFromArray:filePaths];

0 commit comments

Comments
 (0)