File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -4107,20 +4107,15 @@ void diff_setup(struct diff_options *options)
4107
4107
4108
4108
void diff_setup_done (struct diff_options * options )
4109
4109
{
4110
- int count = 0 ;
4110
+ unsigned check_mask = DIFF_FORMAT_NAME |
4111
+ DIFF_FORMAT_NAME_STATUS |
4112
+ DIFF_FORMAT_CHECKDIFF |
4113
+ DIFF_FORMAT_NO_OUTPUT ;
4111
4114
4112
4115
if (options -> set_default )
4113
4116
options -> set_default (options );
4114
4117
4115
- if (options -> output_format & DIFF_FORMAT_NAME )
4116
- count ++ ;
4117
- if (options -> output_format & DIFF_FORMAT_NAME_STATUS )
4118
- count ++ ;
4119
- if (options -> output_format & DIFF_FORMAT_CHECKDIFF )
4120
- count ++ ;
4121
- if (options -> output_format & DIFF_FORMAT_NO_OUTPUT )
4122
- count ++ ;
4123
- if (count > 1 )
4118
+ if (HAS_MULTI_BITS (options -> output_format & check_mask ))
4124
4119
die (_ ("--name-only, --name-status, --check and -s are mutually exclusive" ));
4125
4120
4126
4121
if (HAS_MULTI_BITS (options -> pickaxe_opts & DIFF_PICKAXE_KINDS_MASK ))
You can’t perform that action at this time.
0 commit comments