X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=diffcore-rename.c;h=d6fd3cacd6de4757994c61903dd07e0c4d74a9e9;hb=21baa6e0c56d229866c02c4b42b8b53af648d853;hp=0b0d6b8c8c2ab8833bb5d929ef0d3cb7891ec582;hpb=799fdb4ed0f9443122fdb85f6f73c58cb1de12ec;p=git.git diff --git a/diffcore-rename.c b/diffcore-rename.c index 0b0d6b8c8..d6fd3cacd 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -267,7 +267,7 @@ static int find_identical_files(struct file_similarity *src, int score; struct diff_filespec *source = p->filespec; - /* False hash collission? */ + /* False hash collision? */ if (hashcmp(source->sha1, target->sha1)) continue; /* Non-regular files? If so, the modes must match! */ @@ -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++; }