From 95b48779e84f87ee2c586f2e35f8adcbaa1bba82 Mon Sep 17 00:00:00 2001 From: Johannes Gilger Date: Sun, 12 Sep 2010 17:40:27 +0200 Subject: [PATCH] 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 --- PBDiffWindowController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PBDiffWindowController.m b/PBDiffWindowController.m index 496c850..06403d5 100644 --- a/PBDiffWindowController.m +++ b/PBDiffWindowController.m @@ -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];