mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
3b69daed86
commit
23dcf77f48
@@ -61,7 +61,7 @@ int init_patch_ids(struct patch_ids *ids)
|
||||
memset(ids, 0, sizeof(*ids));
|
||||
diff_setup(&ids->diffopts);
|
||||
ids->diffopts.detect_rename = 0;
|
||||
DIFF_OPT_SET(&ids->diffopts, RECURSIVE);
|
||||
ids->diffopts.flags.RECURSIVE = 1;
|
||||
diff_setup_done(&ids->diffopts);
|
||||
hashmap_init(&ids->patches, patch_id_cmp, &ids->diffopts, 256);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user