<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/mergetools, branch v2.48.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.48.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.48.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-10-04T21:21:40Z</updated>
<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.shady.money/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.shady.money/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.shady.money/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.shady.money/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.shady.money/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.shady.money/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>
<entry>
<title>mergetools: vimdiff: simplify tabfirst</title>
<updated>2022-08-10T19:39:39Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2022-08-10T15:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=34133d9658a079b15af97c7c11d22939719e302d'/>
<id>urn:sha1:34133d9658a079b15af97c7c11d22939719e302d</id>
<content type='text'>
If we wrap the tabdo command there's no need for a separate command
call.

Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Reviewed-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 single window layouts</title>
<updated>2022-08-10T19:39:35Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2022-08-10T15:46:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6014eeac0963ccad3f769fc6cdd09a4a64f478d'/>
<id>urn:sha1:b6014eeac0963ccad3f769fc6cdd09a4a64f478d</id>
<content type='text'>
Layouts with a single window other than "MERGED" do not work (e.g.
"LOCAL" or "MERGED+LOCAL").

This is because as the documentation of bufdo says:

    The last buffer (or where an error occurred) becomes the current
    buffer.

And we do always do bufdo the end.

Additionally, we do it only once, when it should be per tab.

Fix this by doing it once per tab right after it's created and before
any buffer is switched.

Cc: Fernando Ramos &lt;greenfoo@u92.eu&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Reviewed-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: rework tab logic</title>
<updated>2022-08-10T19:39:32Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2022-08-10T15:46:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffcc33f6a6923ade435a65d6cba751b3b95e6fd8'/>
<id>urn:sha1:ffcc33f6a6923ade435a65d6cba751b3b95e6fd8</id>
<content type='text'>
If we treat tabs especially, the logic becomes much simpler.

Cc: Fernando Ramos &lt;greenfoo@u92.eu&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Reviewed-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 for diffopt</title>
<updated>2022-08-10T19:39:28Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2022-08-10T15:46:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=60184ab4d3c7fa56a721236e53aa957226bd399f'/>
<id>urn:sha1:60184ab4d3c7fa56a721236e53aa957226bd399f</id>
<content type='text'>
When diffopt has hiddenoff set and there's only one window (as is the
case in the single window mode) the diff mode is turned off.

We don't want that, so turn that option off.

Cc: Fernando Ramos &lt;greenfoo@u92.eu&gt;
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Reviewed-by: Fernando Ramos &lt;greenfoo@u92.eu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
