]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diffcore-rename.c
Git 2.24
[thirdparty/git.git] / diffcore-rename.c
index 611b08f463d670862605500036db4942c8fbfef4..531d7adeafe0e218de2a56a9dbb8b4156d2d4921 100644 (file)
@@ -284,7 +284,7 @@ static int find_identical_files(struct hashmap *srcs,
         */
        p = hashmap_get_entry_from_hash(srcs, hash, NULL,
                                        struct file_similarity, entry);
-       hashmap_for_each_entry_from(srcs, p, struct file_similarity, entry) {
+       hashmap_for_each_entry_from(srcs, p, entry) {
                int score;
                struct diff_filespec *source = p->filespec;
 
@@ -358,7 +358,7 @@ static int find_exact_renames(struct diff_options *options)
                renames += find_identical_files(&file_table, i, options);
 
        /* Free the hash data structure and entries */
-       hashmap_free(&file_table, 1);
+       hashmap_free_entries(&file_table, struct file_similarity, entry);
 
        return renames;
 }
@@ -584,7 +584,7 @@ void diffcore_rename(struct diff_options *options)
        stop_progress(&progress);
 
        /* cost matrix sorted by most to least similar pair */
-       QSORT(mx, dst_cnt * NUM_CANDIDATE_PER_DST, score_compare);
+       STABLE_QSORT(mx, dst_cnt * NUM_CANDIDATE_PER_DST, score_compare);
 
        rename_count += find_renames(mx, dst_cnt, minimum_score, 0);
        if (detect_rename == DIFF_DETECT_COPY)