aboutsummaryrefslogtreecommitdiffstats
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-22 16:28:23 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-22 16:28:23 -0800
commita1b01c45d58bba35ec1c2533dfb8d87cfa08b19e (patch)
tree648414277bdb09c79e05bcf2a938a97225db598a /diffcore-rename.c
parentMerge branch 'tc/format-attribute' (diff)
parentdiffcore-rename: reduce memory footprint by freeing blob data early (diff)
downloadgit-a1b01c45d58bba35ec1c2533dfb8d87cfa08b19e.tar.gz
git-a1b01c45d58bba35ec1c2533dfb8d87cfa08b19e.zip
Merge branch 'jk/maint-break-rename-reduce-memory'
* 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++;
}