summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-03 22:37:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-03 22:37:02 (GMT)
commit73b690a634b7065471144e0b97c74f30cef2acef (patch)
tree00fbe2ce60815b2eff4852199745cd0e74f852a4 /builtin/apply.c
parent71f19cce36103dce545e647e707be2e9a474139a (diff)
parent0a80bc9f13bf4373778e787b3a050f5b784faf30 (diff)
downloadgit-73b690a634b7065471144e0b97c74f30cef2acef.zip
git-73b690a634b7065471144e0b97c74f30cef2acef.tar.gz
git-73b690a634b7065471144e0b97c74f30cef2acef.tar.bz2
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
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 525db4a..65b97ee 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1601,6 +1601,9 @@ static int parse_fragment(const char *line, unsigned long size,
if (!deleted && !added)
leading++;
trailing++;
+ if (!apply_in_reverse &&
+ ws_error_action == correct_ws_error)
+ check_whitespace(line, len, patch->ws_rule);
break;
case '-':
if (apply_in_reverse &&