Open
Description
The diff view controller was not optimized to render 10,000 diffs if that's what you get 😕
- What you want starts in the
GIConflictResolverViewController
class, which itself uses aGIDiffContentsViewController
andGIDiffFilesViewController
. - The contents to display is set in
-_reloadContents
, and comes from theGCLiveRepository
instance (theunifiedStatus
andindexConflicts
properties). - These properties are live updated once enabled by
GIConflictResolverViewController
using atself.repository.statusMode = kGCLiveRepositoryStatusMode_Unified;
. - The property live update happens in
-[GCLiveRepository _updateStatus]
where the diffs are actually computed.
So basically one approach would be to add an extra parameter to the diff APIs so allow filtering based on name or file state or whatever you want. The actual implementation is in:
- (GCDiff*)_diffWithType:(GCDiffType)type
filePattern:(NSString*)filePattern
options:(GCDiffOptions)options
maxInterHunkLines:(NSUInteger)maxInterHunkLines
maxContextLines:(NSUInteger)maxContextLines
error:(NSError**)error
block:(int (^)(git_diff** outDiff, git_diff_options* diffOptions))block {
...
}
Then this parameter is is turn exposed on GCLiveRepository
and can eventually be set by GIConflictResolverViewController
as needed.