diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-02-27 16:04:32 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-02-27 16:04:32 -0800 |
| commit | 66b1160141fc9c5ea01c473aaef4e6a5c8532ec5 (patch) | |
| tree | 52a24e95c9db279df2b57b5b5ab7e4ec68a7c79c /Documentation | |
| parent | 03f9f1a3a24053e90de15b432b02d746fc25bb6a (diff) | |
| parent | b21d164275b9186421ebe39498be47ea9f171694 (diff) | |
| download | git-66b1160141fc9c5ea01c473aaef4e6a5c8532ec5.tar.xz | |
Merge branch 'km/mergetool-vimdiff-layout-fallback'
Variants of vimdiff learned to honor mergetool.<variant>.layout settings.
* km/mergetool-vimdiff-layout-fallback:
mergetools: vimdiff: use correct tool's name when reading mergetool config
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/config/mergetool.txt | 19 | ||||
| -rw-r--r-- | Documentation/mergetools/vimdiff.txt | 3 |
2 files changed, 15 insertions, 7 deletions
diff --git a/Documentation/config/mergetool.txt b/Documentation/config/mergetool.txt index 294f61efd1..00bf665aa0 100644 --- a/Documentation/config/mergetool.txt +++ b/Documentation/config/mergetool.txt @@ -45,14 +45,21 @@ mergetool.meld.useAutoMerge:: value of `false` avoids using `--auto-merge` altogether, and is the default value. -mergetool.vimdiff.layout:: - The vimdiff backend uses this variable to control how its split - windows appear. Applies even if you are using Neovim (`nvim`) or - gVim (`gvim`) as the merge tool. See BACKEND SPECIFIC HINTS section +mergetool.<vimdiff variant>.layout:: + Configure the split window layout for vimdiff's `<variant>`, which is any of `vimdiff`, + `nvimdiff`, `gvimdiff`. + Upon launching `git mergetool` with `--tool=<variant>` (or without `--tool` + if `merge.tool` is configured as `<variant>`), Git will consult + `mergetool.<variant>.layout` to determine the tool's layout. If the + variant-specific configuration is not available, `vimdiff`'s is used as + fallback. If that too is not available, a default layout with 4 windows + will be used. To configure the layout, see the `BACKEND SPECIFIC HINTS` +ifdef::git-mergetool[] + section. +endif::[] ifndef::git-mergetool[] - in linkgit:git-mergetool[1]. + section in linkgit:git-mergetool[1]. endif::[] - for details. mergetool.hideResolved:: During a merge, Git will automatically resolve as many conflicts as diff --git a/Documentation/mergetools/vimdiff.txt b/Documentation/mergetools/vimdiff.txt index d1a4c468e6..befa86d692 100644 --- a/Documentation/mergetools/vimdiff.txt +++ b/Documentation/mergetools/vimdiff.txt @@ -177,7 +177,8 @@ Instead of `--tool=vimdiff`, you can also use one of these other variants: When using these variants, in order to specify a custom layout you will have to set configuration variables `mergetool.gvimdiff.layout` and -`mergetool.nvimdiff.layout` instead of `mergetool.vimdiff.layout` +`mergetool.nvimdiff.layout` instead of `mergetool.vimdiff.layout` (though the +latter will be used as fallback if the variant-specific one is not set). In addition, for backwards compatibility with previous Git versions, you can also append `1`, `2` or `3` to either `vimdiff` or any of the variants (ex: |
