Skip to content

Commit 73b690a

Browse files
committed
Merge branch 'jc/apply-ws-fix-expands-report'
"git apply --whitespace=fix" fixed whitespace errors in the common context lines but did so without reporting. * jc/apply-ws-fix-expands-report: apply: detect and mark whitespace errors in context lines when fixing
2 parents 71f19cc + 0a80bc9 commit 73b690a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

builtin/apply.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,9 @@ static int parse_fragment(const char *line, unsigned long size,
16011601
if (!deleted && !added)
16021602
leading++;
16031603
trailing++;
1604+
if (!apply_in_reverse &&
1605+
ws_error_action == correct_ws_error)
1606+
check_whitespace(line, len, patch->ws_rule);
16041607
break;
16051608
case '-':
16061609
if (apply_in_reverse &&

0 commit comments

Comments
 (0)