clang-format: outline the git project's coding style
[gitweb.git] / notes-merge.c
index 7d88857a8046efa491b2198b5483ea0f231485cd..c12b354f1003a29c6faf58e7ec970e4ac761812e 100644 (file)
@@ -99,8 +99,7 @@ static struct notes_merge_pair *find_notes_merge_pair_pos(
        else {
                *occupied = 0;
                if (insert_new && i < len) {
-                       memmove(list + i + 1, list + i,
-                               (len - i) * sizeof(struct notes_merge_pair));
+                       MOVE_ARRAY(list + i + 1, list + i, len - i);
                        memset(list + i, 0, sizeof(struct notes_merge_pair));
                }
        }
@@ -129,7 +128,7 @@ static struct notes_merge_pair *diff_tree_remote(struct notes_merge_options *o,
        DIFF_OPT_SET(&opt, RECURSIVE);
        opt.output_format = DIFF_FORMAT_NO_OUTPUT;
        diff_setup_done(&opt);
-       diff_tree_sha1(base->hash, remote->hash, "", &opt);
+       diff_tree_oid(base, remote, "", &opt);
        diffcore_std(&opt);
 
        changes = xcalloc(diff_queued_diff.nr, sizeof(struct notes_merge_pair));
@@ -192,7 +191,7 @@ static void diff_tree_local(struct notes_merge_options *o,
        DIFF_OPT_SET(&opt, RECURSIVE);
        opt.output_format = DIFF_FORMAT_NO_OUTPUT;
        diff_setup_done(&opt);
-       diff_tree_sha1(base->hash, local->hash, "", &opt);
+       diff_tree_oid(base, local, "", &opt);
        diffcore_std(&opt);
 
        for (i = 0; i < diff_queued_diff.nr; i++) {