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 <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
07a4a3b496
commit
86c91f9179
@ -674,6 +674,7 @@ _git_am ()
|
||||
--*)
|
||||
__gitcomp "
|
||||
--3way --committer-date-is-author-date --ignore-date
|
||||
--ignore-whitespace --ignore-space-change
|
||||
--interactive --keep --no-utf8 --signoff --utf8
|
||||
--whitespace=
|
||||
"
|
||||
@ -695,6 +696,7 @@ _git_apply ()
|
||||
--stat --numstat --summary --check --index
|
||||
--cached --index-info --reverse --reject --unidiff-zero
|
||||
--apply --no-add --exclude=
|
||||
--ignore-whitespace --ignore-space-change
|
||||
--whitespace= --inaccurate-eof --verbose
|
||||
"
|
||||
return
|
||||
@ -1536,6 +1538,7 @@ _git_config ()
|
||||
__gitcomp "
|
||||
add.ignore-errors
|
||||
alias.
|
||||
apply.ignorewhitespace
|
||||
apply.whitespace
|
||||
branch.autosetupmerge
|
||||
branch.autosetuprebase
|
||||
|
Reference in New Issue
Block a user