Commits

Jason Harris committed 47000c7

- Fix a bug that EricW found where the exclusions where not being properly excluded.

Comments (0)

Files changed (2)

Classes/FilesView/FSViewer.m

 	// with the latest changes. 
 	NSArray* changedPathsWithExclusions = restrictPathsToPaths([[self hunkExclusions] absolutePathsWithExclusionsForRoot:rootPath], absoluteChangedPaths);
 	if (IsEmpty(changedPathsWithExclusions)) return;
-	NSMutableArray* argsDiff = [NSMutableArray arrayWithObjects:@"diff", @"--unified", @"1", nil];
+	NSMutableArray* argsDiff = [NSMutableArray arrayWithObjects:@"diff", nil];
+	[argsDiff addObject:@"--unified" followedBy:fstr(@"%d",NumContextLinesForDifferencesWebviewFromDefaults())];
 	[argsDiff addObjectsFromArray:changedPathsWithExclusions];
 	ExecutionResult* diffResult = [TaskExecutions executeMercurialWithArgs:argsDiff  fromRoot:rootPath logging:eLoggingNone];
 	PatchData* patchData = IsNotEmpty(diffResult.outStr) ? [PatchData patchDataFromDiffContents:diffResult.outStr] : nil;

Classes/Sheets/CommitSheet/CommitSheetController.m

 	if (IsNotEmpty(contestedPaths))
 	{
 		NSMutableArray* argsDiff = [NSMutableArray arrayWithObjects:@"diff", nil];
+		[argsDiff addObject:@"--unified" followedBy:fstr(@"%d",NumContextLinesForDifferencesWebviewFromDefaults())];
 		[argsDiff addObjectsFromArray:contestedPaths];
 		ExecutionResult* diffResult = [TaskExecutions executeMercurialWithArgs:argsDiff  fromRoot:rootPath logging:eLoggingNone];
 		PatchData* patchData = IsNotEmpty(diffResult.outStr) ? [PatchData patchDataFromDiffContents:diffResult.outStr] : nil;