Merge branch 'jk/rev-parse-cleanup'
[gitweb.git] / builtin / diff-tree.c
index 06ac997976d44a72671278b1d8ce01dd66e560a9..326f88b6576d6c02e9a0bcecb5a0b402bb257372 100644 (file)
@@ -146,9 +146,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,