<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/mergetools, branch master</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=master</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2025-06-06T22:05:47Z</updated>
<entry>
<title>doc: update references to renamed AsciiDoc files</title>
<updated>2025-06-06T22:05:47Z</updated>
<author>
<name>Jouke Witteveen</name>
<email>j.witteveen@gmail.com</email>
</author>
<published>2025-05-21T19:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3717a5775a7ba9e5f5b2794171ab205c0a177ef8'/>
<id>urn:sha1:3717a5775a7ba9e5f5b2794171ab205c0a177ef8</id>
<content type='text'>
The .txt extensions were changed to .adoc in 1f010d6 (doc: use .adoc
extension for AsciiDoc files, 2025-01-20). References to the renamed
files were not updated yet.

Signed-off-by: Jouke Witteveen &lt;j.witteveen@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fr/vimdiff-layout-fixes'</title>
<updated>2025-04-08T18:43:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-04-08T18:43:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=09977c5f501bc0438dfaa99690491c849895f476'/>
<id>urn:sha1:09977c5f501bc0438dfaa99690491c849895f476</id>
<content type='text'>
Layout configuration in vimdiff backend didn't work as advertised,
which has been corrected.

* fr/vimdiff-layout-fixes:
  mergetools: vimdiff: add tests for layout with REMOTE as the target
  mergetools: vimdiff: fix layout where REMOTE is the target
</content>
</entry>
<entry>
<title>mergetools: vimdiff: add tests for layout with REMOTE as the target</title>
<updated>2025-03-25T23:22:41Z</updated>
<author>
<name>Fernando Ramos</name>
<email>greenfoo@u92.eu</email>
</author>
<published>2025-03-25T22:23:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=93bab2d04be7ac304a5dd899daccd3e357126f79'/>
<id>urn:sha1:93bab2d04be7ac304a5dd899daccd3e357126f79</id>
<content type='text'>
Add some tests to make sure that now "REMOTE" can be used as a target
(ie. can be used together with the "@" marker) inside
"mergetool.vimdiff.layout"

Signed-off-by: Fernando Ramos &lt;greenfoo@u92.eu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mergetools: vimdiff: fix layout where REMOTE is the target</title>
<updated>2025-03-25T23:22:32Z</updated>
<author>
<name>Fernando Ramos</name>
<email>greenfoo@u92.eu</email>
</author>
<published>2025-03-25T22:23:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e2d74193c0e74666498004f5ef7a3473e8993063'/>
<id>urn:sha1:e2d74193c0e74666498004f5ef7a3473e8993063</id>
<content type='text'>
"mergetool.vimdiff.layout" is used to define the vim layout (ie. how
windows, tabs and buffers are physically organized) when resolving
conflicts.

For example, if we set it to this:

    "(LOCAL,BASE,REMOTE)/MERGED"

...vim will open and show this layout:

    ------------------------------------------
    |             |           |              |
    |   LOCAL     |   BASE    |   REMOTE     |
    |             |           |              |
    ------------------------------------------
    |                                        |
    |                MERGED                  |
    |                                        |
    ------------------------------------------

By default, whatever ends up been written to the "MERGED" window will
become the file which conflict we are resolving.

However, it is possible to use the "@" symbol to specify a different
one.  For example, if we use this slightly different version of the
previously used string:

    "(LOCAL,BASE,@REMOTE)/MERGED"

...then the user should proceed to edit the contents of the top right
window (instead of the bottom window) as *that* is what will become the
conflicts free file once vim is closed.

Before this commit, the "@" marker worked for all targets *except* for
"REMOTE". In other words, these worked as expected:

    "(@LOCAL,BASE,REMOTE)/MERGED"
    "(LOCAL,@BASE,REMOTE)/MERGED"
    "(LOCAL,BASE,REMOTE)/@MERGED"

...but this didn't:

    "(LOCAL,BASE,@REMOTE)/MERGED"

This commit fixes that.

Reported-by: kawarimidoll &lt;kawarimidoll+git@gmail.com&gt;
Suggested-by: D. Ben Knoble &lt;ben.knoble@gmail.com&gt;
Signed-off-by: Fernando Ramos &lt;greenfoo@u92.eu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ak/typofix-2.46-maint'</title>
<updated>2024-10-04T21:21:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-10-04T21:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4861bbf85a1265c6a0e939674bb4441e748d5542'/>
<id>urn:sha1:4861bbf85a1265c6a0e939674bb4441e748d5542</id>
<content type='text'>
Typofixes.

* ak/typofix-2.46-maint:
  perl: fix a typo
  mergetool: fix a typo
  reftable: fix a typo
  trace2: fix typos
</content>
</entry>
<entry>
<title>mergetool: fix a typo</title>
<updated>2024-10-03T19:06:51Z</updated>
<author>
<name>Andrew Kreimer</name>
<email>algonell@gmail.com</email>
</author>
<published>2024-10-02T22:38:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2c1070c75869fd658a6aab066c380044b5c1a5ca'/>
<id>urn:sha1:2c1070c75869fd658a6aab066c380044b5c1a5ca</id>
<content type='text'>
Fix a typo in comments.

Signed-off-by: Andrew Kreimer &lt;algonell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mergetools: vscode: new tool</title>
<updated>2024-09-02T03:47:58Z</updated>
<author>
<name>Alex Henrie</name>
<email>alexhenrie24@gmail.com</email>
</author>
<published>2024-09-02T02:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6b77283f5e7fffcc74c032f2e692aaab1ddbe58a'/>
<id>urn:sha1:6b77283f5e7fffcc74c032f2e692aaab1ddbe58a</id>
<content type='text'>
VSCode has supported three-way merges since 2022, see
&lt;https://github.com/microsoft/vscode/issues/5770#issuecomment-1188658476&gt;.

Although the program binary is located at /usr/bin/code, name the
mergetool "vscode" because the word "code" is too generic and would lead
to confusion. The name "vscode" also matches Git's existing
contrib/vscode directory.

On Windows, VSCode adds the directory that contains code.cmd to %PATH%,
so there is no need to invoke mergetool_find_win32_cmd to search for the
program.

Signed-off-by: Alex Henrie &lt;alexhenrie24@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Switch grep from non-portable BRE to portable ERE</title>
<updated>2024-05-17T19:13:18Z</updated>
<author>
<name>Marcel Telka</name>
<email>marcel@telka.sk</email>
</author>
<published>2024-05-17T19:01:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0f063b6c766fc98124f60b6b0f8424142641ff88'/>
<id>urn:sha1:0f063b6c766fc98124f60b6b0f8424142641ff88</id>
<content type='text'>
This makes the grep usage fully POSIX compliant.  The ability to
enable ERE features in BRE using backslash is a GNU extension.

Signed-off-by: Marcel Telka &lt;marcel@telka.sk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>vimdiff: make script and tests work with zsh</title>
<updated>2024-04-26T23:31:46Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2024-04-26T22:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=fedd5c79ff855a4e3859e5c3fa5784942185436b'/>
<id>urn:sha1:fedd5c79ff855a4e3859e5c3fa5784942185436b</id>
<content type='text'>
When we process the $LAYOUT variable through sed, the result will end
with the character "#".  We then split it at the shell using IFS so that
we can process it a character at a time.

POSIX specifies that only "IFS white space shall be ignored at the
beginning and end of the input".  The hash mark is not a white space
character, so it is not ignored at the beginning and end of the input.

POSIX then specifies that "[e]ach occurrence in the input of an IFS
character that is not IFS white space, along with any adjacent IFS white
space, shall delimit a field, as described previously."  Thus, the final
hash mark delimits a field, and the final field is the empty string.

zsh implements this behavior strictly in compliance with POSIX (and
differently from most other shells), such that we end up with a trailing
empty field.  We don't want this empty field and processing it in the
normal way causes us to fail to parse properly and fail the tests with
"ERROR" entries, so let's just ignore it instead.  This is the behavior
of bash and dash anyway and what was clearly intended, so this is a
reasonable thing to do.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mergetools: vimdiff: use correct tool's name when reading mergetool config</title>
<updated>2024-02-19T16:45:14Z</updated>
<author>
<name>Kipras Melnikovas</name>
<email>kipras@kipras.org</email>
</author>
<published>2024-02-17T16:27:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b21d164275b9186421ebe39498be47ea9f171694'/>
<id>urn:sha1:b21d164275b9186421ebe39498be47ea9f171694</id>
<content type='text'>
The /mergetools/vimdiff script, which handles both vimdiff, nvimdiff
and gvimdiff mergetools (the latter 2 simply source the vimdiff script), has a
function merge_cmd() which read the layout variable from git config, and it
would always read the value of mergetool.**vimdiff**.layout, instead of the
mergetool being currently used (vimdiff or nvimdiff or gvimdiff).

It looks like in 7b5cf8be18 (vimdiff: add tool documentation, 2022-03-30),
we explained the current behavior in Documentation/config/mergetool.txt:

```
mergetool.vimdiff.layout::
	The vimdiff backend uses this variable to control how its split
	windows look like. Applies even if you are using Neovim (`nvim`) or
	gVim (`gvim`) as the merge tool. See BACKEND SPECIFIC HINTS section
```

which makes sense why it's explained this way - the vimdiff backend is used by
gvim and nvim. But the mergetool's configuration should be separate for each tool,
and indeed that's confirmed in same commit at Documentation/mergetools/vimdiff.txt:

```
Variants

Instead of `--tool=vimdiff`, you can also use one of these other variants:
  * `--tool=gvimdiff`, to open gVim instead of Vim.
  * `--tool=nvimdiff`, to open Neovim instead of Vim.

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`
```

So it looks like we just forgot to update the 1 part of the vimdiff script
that read the config variable. Cheers.

Though, for backward compatibility, I've kept the mergetool.vimdiff
fallback, so that people who unknowingly relied on it, won't have their
setup broken now.

Signed-off-by: Kipras Melnikovas &lt;kipras@kipras.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
