diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-04 20:40:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-05 10:31:09 -0700 |
commit | ebb722625805a0e98b5b8c062b79abd8eca1f639 (patch) | |
tree | e71c3c0434b492701e87caea73af464ba45d909a /t/t1506-rev-parse-diagnosis.sh | |
parent | diffcore-pickaxe: respect --no-textconv (diff) | |
download | tgif-ebb722625805a0e98b5b8c062b79abd8eca1f639.tar.xz |
diffcore-pickaxe: port optimization from has_changes() to diff_grep()
These two functions are called in the same codeflow to implement
"log -S<block>" and "log -G<pattern>", respectively, but the latter
lacked two obvious optimizations the former implemented, namely:
- When a pickaxe limit is not given at all, they should return
without wasting any cycle;
- When both sides of the filepair are the same, and the same
textconv conversion apply to them, return early, as there will be
no interesting differences between the two anyway.
Also release the filespec data once the processing is done (this is
not about leaking memory--it is about releasing data we finished
looking at as early as possible).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1506-rev-parse-diagnosis.sh')
0 files changed, 0 insertions, 0 deletions