Re: [PATCH 3/5] use SWAP macro
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 30, 2017, 16:03 UTC
- Message-ID
- <alpine.DEB.2.20.1701301702120.3469@virtualbox>
- In-Reply-To
- <187c2b39-40cf-7e07-b489-d40cdf5f9145@web.de>
Hi René,
On Sat, 28 Jan 2017, René Scharfe wrote:
Show 13 quoted lines
> 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