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 a GIDiffContentsViewController and GIDiffFilesViewController.
- The contents to display is set in
-_reloadContents, and comes from the GCLiveRepository instance (the unifiedStatus and indexConflicts properties).
- These properties are live updated once enabled by
GIConflictResolverViewController using at self.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.
The diff view controller was not optimized to render 10,000 diffs if that's what you get 😕
GIConflictResolverViewControllerclass, which itself uses aGIDiffContentsViewControllerandGIDiffFilesViewController.-_reloadContents, and comes from theGCLiveRepositoryinstance (theunifiedStatusandindexConflictsproperties).GIConflictResolverViewControllerusing atself.repository.statusMode = kGCLiveRepositoryStatusMode_Unified;.-[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:
Then this parameter is is turn exposed on
GCLiveRepositoryand can eventually be set byGIConflictResolverViewControlleras needed.