summaryrefslogtreecommitdiff
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-03 13:51:21 -0800
committerJunio C Hamano <gitster@pobox.com>2009-12-03 13:51:21 -0800
commit9a6b9cdd7240d10f9e70bfc383960b28c8f2b9a7 (patch)
treea16367b8d57dd6b5f35ef44890b5a193b60539e1 /diffcore-rename.c
parentc206224b2b7a32924c40b162c59329da143aba1f (diff)
parent809809bb75e8a65ef543ab706aab4791459be95c (diff)
Merge branch 'jk/maint-break-rename-reduce-memory' into maint
* jk/maint-break-rename-reduce-memory: diffcore-rename: reduce memory footprint by freeing blob data early diffcore-break: save cnt_data for other phases diffcore-break: free filespec data as we go
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 63ac998bfa..d6fd3cacd6 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -523,10 +523,13 @@ void diffcore_rename(struct diff_options *options)
this_src.dst = i;
this_src.src = j;
record_if_better(m, &this_src);
+ /*
+ * Once we run estimate_similarity,
+ * We do not need the text anymore.
+ */
diff_free_filespec_blob(one);
+ diff_free_filespec_blob(two);
}
- /* We do not need the text anymore */
- diff_free_filespec_blob(two);
dst_cnt++;
}