Skip to content

Commit 395877f

Browse files
sleiferbrotherbard
authored andcommitted
explicitly disable external diff so we get the results we need even if the user has an external diff configured
1 parent 62319b8 commit 395877f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

PBDiffWindowController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ + (void) showDiffWindowWithFiles:(NSArray *)filePaths fromCommit:(PBGitCommit *)
3434
diffCommit = [startCommit.repository headCommit];
3535

3636
NSString *commitSelector = [NSString stringWithFormat:@"%@..%@", [startCommit realSha], [diffCommit realSha]];
37-
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"diff", commitSelector, nil];
37+
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"diff", @"--no-ext-diff", commitSelector, nil];
3838

3939
if (![PBGitDefaults showWhitespaceDifferences])
4040
[arguments insertObject:@"-w" atIndex:1];

gitx.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ void handleSTDINDiff()
124124
}
125125
}
126126

127-
void handleDiffWithArguments(NSURL *repositoryURL, NSMutableArray *arguments)
127+
void handleDiffWithArguments(NSURL *repositoryURL, NSArray *arguments)
128128
{
129-
[arguments insertObject:@"diff" atIndex:0];
129+
arguments = [[NSArray arrayWithObjects:@"diff", @"--no-ext-diff", nil] arrayByAddingObjectsFromArray:arguments];
130130

131131
int retValue = 1;
132132
NSString *diffOutput = [PBEasyPipe outputForCommand:[PBGitBinary path] withArgs:arguments inDir:[repositoryURL path] retValue:&retValue];

0 commit comments

Comments
 (0)