aboutsummaryrefslogtreecommitdiffstats
path: root/object-file.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-06-08 16:11:40 +0000
committerJunio C Hamano <gitster@pobox.com>2021-06-09 11:40:04 +0900
commit61bf4490afffb946787edec63b932551b3089d27 (patch)
tree7ad442158e55ae4e401816018de6375982524ed4 /object-file.c
parent5a3743da326b2e041c65ac12ba0d04a1fed45b58 (diff)
downloadgit-61bf4490afffb946787edec63b932551b3089d27.tar.gz
diffcore-rename: avoid unnecessary strdup'ing in break_idx
The keys of break_idx are strings from the diff_filepairs of diff_queued_diff. break_idx is only used in location_rename_dst(), and that usage is always before any free'ing of the pairs (and thus the strings in the pairs). As such, there is no need to strdup these keys; we can just reuse the existing strings as-is. The merge logic doesn't make use of break detection, so this does not affect the performance of any of my testcases. It was just a minor unrelated optimization noted in passing while looking at the code. Signed-off-by: Elijah Newren <newren@gmail.com> Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.c')
0 files changed, 0 insertions, 0 deletions