Merge branch 'jc/diff-I-status-fix'
"git diff -I<pattern> -exit-code" should exit with 0 status when all the changes match the ignored pattern, but it didn't. * jc/diff-I-status-fix: diff: correct interaction between --exit-code and -I<pattern>
This commit is contained in:
3
diff.c
3
diff.c
@ -4634,7 +4634,8 @@ void diff_setup_done(struct diff_options *options)
|
||||
* inside contents.
|
||||
*/
|
||||
|
||||
if ((options->xdl_opts & XDF_WHITESPACE_FLAGS))
|
||||
if ((options->xdl_opts & XDF_WHITESPACE_FLAGS) ||
|
||||
options->ignore_regex_nr)
|
||||
options->flags.diff_from_contents = 1;
|
||||
else
|
||||
options->flags.diff_from_contents = 0;
|
||||
|
||||
Reference in New Issue
Block a user