mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
CommitController: Don't show files that are in conflict twice
This commit is contained in:
+12
-1
@@ -119,7 +119,18 @@
|
||||
PBChangedFile *file = [[PBChangedFile alloc] initWithPath:[components objectAtIndex:1] andRepository:repository];
|
||||
file.status = MODIFIED;
|
||||
file.cached = NO;
|
||||
[unstagedFilesController addObject: file];
|
||||
|
||||
// FIXME: If you are in a merge and have conflicts, a file is displayed twice, with different
|
||||
// index values. For now, we don't handle this gracefully.
|
||||
BOOL fileExists = NO;
|
||||
for (PBChangedFile *object in [unstagedFilesController arrangedObjects]) {
|
||||
if ([[object path] isEqualToString:[file path]]) {
|
||||
fileExists = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!fileExists)
|
||||
[unstagedFilesController addObject: file];
|
||||
}
|
||||
[self doneProcessingIndex];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user