Merge branch 'lt/pathspec-negative'
[gitweb.git] / builtin / diff-tree.c
index 806dd7a885e9e7b87e19ca8acd2b6d0383b41d85..8ce00480cd484e10b0b46d931c934fcd3ba7b71e 100644 (file)
@@ -147,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,