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>
This commit is contained in:
Johannes Gilger
2010-09-12 17:40:27 +02:00
committed by Nathan Kinsinger
parent f2cf438179
commit 95b48779e8
+5
View File
@@ -9,6 +9,7 @@
#import "PBDiffWindowController.h"
#import "PBGitRepository.h"
#import "PBGitCommit.h"
#import "PBGitDefaults.h"
@implementation PBDiffWindowController
@@ -34,6 +35,10 @@
NSString *commitSelector = [NSString stringWithFormat:@"%@..%@", [startCommit realSha], [diffCommit realSha]];
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"diff", commitSelector, nil];
if (![PBGitDefaults showWhitespaceDifferences])
[arguments insertObject:@"-w" atIndex:1];
if (filePaths) {
[arguments addObject:@"--"];
[arguments addObjectsFromArray:filePaths];