Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diffcore-rename: speed up register_rename_src
Teach register_rename_src() to see if new file pair can simply be appended to the rename_src[] array before performing the binary search to find the proper insertion point. This is a performance optimization. This routine is called during run_diff_files in status and the caller is iterating over the sorted index, so we should expect to be able to append in the normal case. The existing insert logic is preserved so we don't have to assume that, but simply take advantage of it if possible. Signed-off-by: Jeff Hostetler <[email protected]>
- Loading branch information