submodule init: warn about falling back to a local path
[gitweb.git] / builtin / diff-tree.c
index 2a12b81e065bfb75f05baf6694e1a9d53129bc40..8ce00480cd484e10b0b46d931c934fcd3ba7b71e 100644 (file)
@@ -114,6 +114,8 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
        opt->disable_stdin = 1;
        memset(&s_r_opt, 0, sizeof(s_r_opt));
        s_r_opt.tweak = diff_tree_tweak_rev;
+
+       precompose_argv(argc, argv);
        argc = setup_revisions(argc, argv, opt, &s_r_opt);
 
        while (--argc > 0) {
@@ -145,9 +147,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
                tree1 = opt->pending.objects[0].item;
                tree2 = opt->pending.objects[1].item;
                if (tree2->flags & UNINTERESTING) {
-                       struct object *tmp = tree2;
-                       tree2 = tree1;
-                       tree1 = tmp;
+                       SWAP(tree2, tree1);
                }
                diff_tree_sha1(tree1->oid.hash,
                               tree2->oid.hash,