Skip to contentSkip to conversation

merge-recursive: use DIFF_XDL_SET macro

PATCH In review Stefan Beller 2 participants 2 messages Jun 29, 2017 – Jun 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 merge-recursive: use DIFF_XDL_SET macro

Instead of implementing this on our own, just use a convenience macro.

---
 merge-recursive.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
merge-recursive.c +3 -3
index 59e5ee41a8..1494ffdb82 100644
@@ -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"))
Signature · 1 line
2.13.0.31.g9b732c453e
#1 lore raw
Quoted 4 lines · Stefan Beller

Instead of implementing this on our own, just use a convenience macro.

---

Good eyes. Thanks.

Quoted 22 lines
 merge-recursive.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
merge-recursive.c +3 -3
index 59e5ee41a8..1494ffdb82 100644
@@ -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"))