summary refs log tree commit diff
path: root/diff-no-index.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-10-31 11:19:09 -0700
committerJunio C Hamano <gitster@pobox.com>2017-11-01 11:50:03 +0900
commit23dcf77f48feb49c54bad09210f093a799816334 (patch)
treeeff748e83bc0e1bf41b631d77d5c38f82a549ee5 /diff-no-index.c
parent3b69daed861daec1923c369d59c97e46eb3c3d7b (diff)
diff: remove DIFF_OPT_SET macro
Remove the `DIFF_OPT_SET` macro and instead set the flags directly.
This conversion is done using the following semantic patch:

	@@
	expression E;
	identifier fld;
	@@
	- DIFF_OPT_SET(&E, fld)
	+ E.flags.fld = 1

	@@
	type T;
	T *ptr;
	identifier fld;
	@@
	- DIFF_OPT_SET(ptr, fld)
	+ ptr->flags.fld = 1

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-no-index.c')
-rw-r--r--diff-no-index.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff-no-index.c b/diff-no-index.c
index 40d17e42c6..a3e1943401 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -276,16 +276,16 @@ void diff_no_index(struct rev_info *revs,
 	if (!revs->diffopt.output_format)
 		revs->diffopt.output_format = DIFF_FORMAT_PATCH;
 
-	DIFF_OPT_SET(&revs->diffopt, NO_INDEX);
+	revs->diffopt.flags.NO_INDEX = 1;
 
-	DIFF_OPT_SET(&revs->diffopt, RELATIVE_NAME);
+	revs->diffopt.flags.RELATIVE_NAME = 1;
 	revs->diffopt.prefix = prefix;
 
 	revs->max_count = -2;
 	diff_setup_done(&revs->diffopt);
 
 	setup_diff_pager(&revs->diffopt);
-	DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
+	revs->diffopt.flags.EXIT_WITH_STATUS = 1;
 
 	if (queue_diff(&revs->diffopt, paths[0], paths[1]))
 		exit(1);