Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-08-04 15:16:49 +0400
committerJunio C Hamano <gitster@pobox.com>2009-08-05 22:59:56 +0400
commit86c91f91794cd6af8e19fbe68ab283d567d2b66f (patch)
tree2a8f3476997717ddf57d6dadd2c553461028d409 /Documentation
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 <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config.txt8
-rw-r--r--Documentation/git-am.txt5
-rw-r--r--Documentation/git-apply.txt13
-rw-r--r--Documentation/git-rebase.txt3
4 files changed, 27 insertions, 2 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index c6f09f801a..0b53cab6af 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -461,6 +461,14 @@ it will be treated as a shell command. For example, defining
executed from the top-level directory of a repository, which may
not necessarily be the current directory.
+apply.ignorewhitespace::
+ When set to 'change', tells 'git-apply' to ignore changes in
+ whitespace, in the same way as the '--ignore-space-change'
+ option.
+ When set to one of: no, none, never, false tells 'git-apply' to
+ respect all whitespace differences.
+ See linkgit:git-apply[1].
+
apply.whitespace::
Tells 'git-apply' how to handle whitespaces, in the same way
as the '--whitespace' option. See linkgit:git-apply[1].
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 32e689b2bf..fcacc94650 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -11,7 +11,7 @@ SYNOPSIS
[verse]
'git am' [--signoff] [--keep] [--utf8 | --no-utf8]
[--3way] [--interactive] [--committer-date-is-author-date]
- [--ignore-date]
+ [--ignore-date] [--ignore-space-change | --ignore-whitespace]
[--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
[--reject] [-q | --quiet]
[<mbox> | <Maildir>...]
@@ -65,6 +65,9 @@ default. You can use `--no-utf8` to override this.
it is supposed to apply to and we have those blobs
available locally.
+--ignore-date::
+--ignore-space-change::
+--ignore-whitespace::
--whitespace=<option>::
-C<n>::
-p<n>::
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 735374d7df..5ee8c91f2d 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -13,6 +13,7 @@ SYNOPSIS
[--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --reverse]
[--allow-binary-replacement | --binary] [--reject] [-z]
[-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]
+ [--ignore-space-change | --ignore-whitespace ]
[--whitespace=<nowarn|warn|fix|error|error-all>]
[--exclude=PATH] [--include=PATH] [--directory=<root>]
[--verbose] [<patch>...]
@@ -149,6 +150,14 @@ patch to each path is used. A patch to a path that does not match any
include/exclude pattern is used by default if there is no include pattern
on the command line, and ignored if there is any include pattern.
+--ignore-space-change::
+--ignore-whitespace::
+ When applying a patch, ignore changes in whitespace in context
+ lines if necessary.
+ Context lines will preserve their whitespace, and they will not
+ undergo whitespace fixing regardless of the value of the
+ `--whitespace` option. New lines will still be fixed, though.
+
--whitespace=<action>::
When applying a patch, detect a new or modified line that has
whitespace errors. What are considered whitespace errors is
@@ -205,6 +214,10 @@ running `git apply --directory=modules/git-gui`.
Configuration
-------------
+apply.ignorewhitespace::
+ Set to 'change' if you want changes in whitespace to be ignored by default.
+ Set to one of: no, none, never, false if you want changes in
+ whitespace to be significant.
apply.whitespace::
When no `--whitespace` flag is given from the command
line, this configuration item is used as the default.
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index db1b71d248..0aefc34d0d 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -268,8 +268,9 @@ OPTIONS
exit with the message "Current branch is up to date" in such a
situation.
+--ignore-whitespace::
--whitespace=<option>::
- This flag is passed to the 'git-apply' program
+ These flag are passed to the 'git-apply' program
(see linkgit:git-apply[1]) that applies the patch.
Incompatible with the --interactive option.