Re: [PATCH 3/5] use SWAP macro
From: Johannes Schindelin <hidden>
Date: 2017-01-30 16:04:21
From: Johannes Schindelin <hidden>
Date: 2017-01-30 16:04:21
Hi René, On Sat, 28 Jan 2017, René Scharfe wrote:
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c index 806dd7a885..8ce00480cd 100644 --- a/builtin/diff-tree.c +++ b/builtin/diff-tree.c@@ -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); }
Is there a way to transform away the curly braces for blocks that become single-line blocks, too? Ciao, Dscho