path: root/
diff options
authorGiuseppe Bilotta <>2009-08-04 11:16:49 (GMT)
committerJunio C Hamano <>2009-08-05 18:59:56 (GMT)
commit86c91f91794cd6af8e19fbe68ab283d567d2b66f (patch)
tree2a8f3476997717ddf57d6dadd2c553461028d409 /
parent07a4a3b4962e1fd4e40fd877427cddd7428c1bc3 (diff)
git apply: option to ignore whitespace differences
Introduce --ignore-whitespace option and corresponding config bool to ignore whitespace differences while applying patches, akin to the 'patch' program. 'git am', 'git rebase' and the bash git completion are made aware of this option. Signed-off-by: Giuseppe Bilotta <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to '')
1 files changed, 3 insertions, 1 deletions
diff --git a/ b/
index d64d997..ab39b3c 100755
--- a/
+++ b/
@@ -16,6 +16,8 @@ s,signoff add a Signed-off-by line to the commit message
u,utf8 recode into utf8 (default)
k,keep pass -k flag to git-mailinfo
whitespace= pass it through git-apply
+ignore-space-change pass it through git-apply
+ignore-whitespace pass it through git-apply
directory= pass it through git-apply
C= pass it through git-apply
p= pass it through git-apply
@@ -303,7 +305,7 @@ do
git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;;
shift ; patch_format="$1" ;;
- --reject)
+ --reject|--ignore-whitespace|--ignore-space-change)
git_apply_opt="$git_apply_opt $1" ;;
committer_date_is_author_date=t ;;