diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-02-17 15:25:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-17 15:25:52 -0800 |
commit | abea4dc76a675d4ac0f27a2367256dc31981d1ca (patch) | |
tree | 07020dfe6fce37c742bc73700d651e117891a416 /Documentation | |
parent | adbbc6f29121aee3aec383a9ac05092c79908033 (diff) | |
parent | 07924d4d50e5304fb53eb60aaba8aef31d4c4e5e (diff) | |
download | git-abea4dc76a675d4ac0f27a2367256dc31981d1ca.tar.gz git-abea4dc76a675d4ac0f27a2367256dc31981d1ca.tar.xz |
Merge branch 'mp/diff-algo-config'
Add diff.algorithm configuration so that the user does not type
"diff --histogram".
* mp/diff-algo-config:
diff: Introduce --diff-algorithm command line option
config: Introduce diff.algorithm variable
git-completion.bash: Autocomplete --minimal and --histogram for git-diff
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/diff-config.txt | 17 | ||||
-rw-r--r-- | Documentation/diff-options.txt | 20 |
2 files changed, 37 insertions, 0 deletions
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index 7c70c2a2f..ac7705025 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -156,3 +156,20 @@ diff.tool:: that a corresponding difftool.<tool>.cmd variable is defined. include::mergetools-diff.txt[] + +diff.algorithm:: + Choose a diff algorithm. The variants are as follows: ++ +-- +`default`, `myers`;; + The basic greedy diff algorithm. Currently, this is the default. +`minimal`;; + Spend extra time to make sure the smallest possible diff is + produced. +`patience`;; + Use "patience diff" algorithm when generating patches. +`histogram`;; + This algorithm extends the patience algorithm to "support + low-occurrence common elements". +-- ++ diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 7a8747352..869d965a3 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -55,6 +55,26 @@ endif::git-format-patch[] --histogram:: Generate a diff using the "histogram diff" algorithm. +--diff-algorithm={patience|minimal|histogram|myers}:: + Choose a diff algorithm. The variants are as follows: ++ +-- +`default`, `myers`;; + The basic greedy diff algorithm. Currently, this is the default. +`minimal`;; + Spend extra time to make sure the smallest possible diff is + produced. +`patience`;; + Use "patience diff" algorithm when generating patches. +`histogram`;; + This algorithm extends the patience algorithm to "support + low-occurrence common elements". +-- ++ +For instance, if you configured diff.algorithm variable to a +non-default value and want to use the default one, then you +have to use `--diff-algorithm=default` option. + --stat[=<width>[,<name-width>[,<count>]]]:: Generate a diffstat. By default, as much space as necessary will be used for the filename part, and the rest for the graph |