threads / patch / 46288

patchmerge-recursive: use DIFF_XDL_SET macro

Subject: [PATCH] merge-recursive: use DIFF_XDL_SET macro

## tl;dr

2 messages between Jun 29, 2017 and Jun 30, 2017. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Stefan Beller· Jun 29, 2017, 22:19 UTC · lore
Instead of implementing this on our own, just use a convenience macro.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
 merge-recursive.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Show changes to merge-recursive.c +3 −3
diff --git a/merge-recursive.c b/merge-recursive.c
index 59e5ee41a8..1494ffdb82 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -2210,11 +2210,11 @@ int parse_merge_opt(struct merge_options *o, const char *s)
 		o->xdl_opts |= value;
 	}
 	else if (!strcmp(s, "ignore-space-change"))
-		o->xdl_opts |= XDF_IGNORE_WHITESPACE_CHANGE;
+		DIFF_XDL_SET(o, IGNORE_WHITESPACE_CHANGE);
 	else if (!strcmp(s, "ignore-all-space"))
-		o->xdl_opts |= XDF_IGNORE_WHITESPACE;
+		DIFF_XDL_SET(o, IGNORE_WHITESPACE);
 	else if (!strcmp(s, "ignore-space-at-eol"))
-		o->xdl_opts |= XDF_IGNORE_WHITESPACE_AT_EOL;
+		DIFF_XDL_SET(o, IGNORE_WHITESPACE_AT_EOL);
 	else if (!strcmp(s, "renormalize"))
 		o->renormalize = 1;
 	else if (!strcmp(s, "no-renormalize"))
-- 
2.13.0.31.g9b732c453e
Junio C Hamano· Jun 30, 2017, 17:54 UTC · re: Stefan Beller · lore

Re: [PATCH] merge-recursive: use DIFF_XDL_SET macro

Stefan Beller <sbeller@google.com> writes:
> Instead of implementing this on our own, just use a convenience macro.
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
Good eyes.  Thanks.
Show 22 quoted lines
>  merge-recursive.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/merge-recursive.c b/merge-recursive.c
> index 59e5ee41a8..1494ffdb82 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -2210,11 +2210,11 @@ int parse_merge_opt(struct merge_options *o, const char *s)
>  		o->xdl_opts |= value;
>  	}
>  	else if (!strcmp(s, "ignore-space-change"))
> -		o->xdl_opts |= XDF_IGNORE_WHITESPACE_CHANGE;
> +		DIFF_XDL_SET(o, IGNORE_WHITESPACE_CHANGE);
>  	else if (!strcmp(s, "ignore-all-space"))
> -		o->xdl_opts |= XDF_IGNORE_WHITESPACE;
> +		DIFF_XDL_SET(o, IGNORE_WHITESPACE);
>  	else if (!strcmp(s, "ignore-space-at-eol"))
> -		o->xdl_opts |= XDF_IGNORE_WHITESPACE_AT_EOL;
> +		DIFF_XDL_SET(o, IGNORE_WHITESPACE_AT_EOL);
>  	else if (!strcmp(s, "renormalize"))
>  		o->renormalize = 1;
>  	else if (!strcmp(s, "no-renormalize"))

← back to recent threads