<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/mergetools, branch v2.37.0-rc2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.0-rc2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.0-rc2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-04-03T22:10:04Z</updated>
<entry>
<title>mergetools: add description to all diff/merge tools</title>
<updated>2022-04-03T22:10:04Z</updated>
<author>
<name>Fernando Ramos</name>
<email>greenfoo@u92.eu</email>
</author>
<published>2022-03-30T19:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=980145f7470e20826ca22d7343494712eda9c81d'/>
<id>urn:sha1:980145f7470e20826ca22d7343494712eda9c81d</id>
<content type='text'>
The output of `git mergetool --tool-help` and `git difftool --tool-help`
only showed the `alias` of each available merge/diff tool.

It is not always obvious what tool these `aliases` end up using (ex:
`opendiff` runs `FileMerge` and `bc` runs `Beyond Compare`).

This commit adds a short description to each of them to help the user
identify the `alias` they want.

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>vimdiff: add tool documentation</title>
<updated>2022-04-03T22:09:52Z</updated>
<author>
<name>Fernando Ramos</name>
<email>greenfoo@u92.eu</email>
</author>
<published>2022-03-30T19:19:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7b5cf8be180940ce099c8413d02fb5707d900708'/>
<id>urn:sha1:7b5cf8be180940ce099c8413d02fb5707d900708</id>
<content type='text'>
Running 'git {merge,diff}tool --tool-help' now also prints usage
information about the vimdiff tool (and its variants) instead of just
its name.

Two new functions ('diff_cmd_help()' and 'merge_cmd_help()') have been
added to the set of functions that each merge tool (ie. scripts found
inside "mergetools/") can overwrite to provided tool specific
information.

Right now, only 'mergetools/vimdiff' implements these functions, but
other tools are encouraged to do so in the future, specially if they
take configuration options not explained anywhere else (as it is the
case with the 'vimdiff' tool and the new 'layout' option)

Note that the function 'show_tool_names', used in the implementation of
'git mergetool --tool-help', is also used in Documentation/Makefile to
generate the list of allowed values for the configuration variables
'{diff,merge}.{gui,}tool'. Adjust the rule so its output is an Asciidoc
"description list" instead of a plain list, with the tool name as the
item and the newly added tool description as the description.

In addition, a section has been added to
"Documentation/git-mergetool.txt" to explain the new "layout"
configuration option with examples.

Helped-by: Philippe Blain &lt;levraiphilippeblain@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>vimdiff: new implementation with layout support</title>
<updated>2022-03-30T20:15:42Z</updated>
<author>
<name>Fernando Ramos</name>
<email>greenfoo@u92.eu</email>
</author>
<published>2022-03-30T19:19:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0041797449da61f4131bb1673fa5d4c3af48240d'/>
<id>urn:sha1:0041797449da61f4131bb1673fa5d4c3af48240d</id>
<content type='text'>
When running 'git mergetool -t vimdiff', a new configuration option
('mergetool.vimdiff.layout') can now be used to select how the user
wants the different windows, tabs and buffers to be displayed.

If the option is not provided, the layout will be the same one that was
being used before this commit (ie. two rows with LOCAL, BASE and COMMIT
in the top one and MERGED in the bottom one).

The 'vimdiff' variants ('vimdiff{1,2,3}') still work but, because they
represented nothing else than different layouts, are now internally
implemented as a subcase of 'vimdiff' with the corresponding
pre-configured 'layout'.

Again, if you don't set "mergetool.vimdiff.layout" everything will work
the same as before *but* the arguments used to call {n,g,}vim will be
others (even if you don't/shouldn't notice it):

  - git mergetool -t vimdiff

    &gt; Before this commit:
      {n,g,}vim -f -d -c '4wincmd w | wincmd J' $LOCAL $BASE $REMOTE $MERGED

    &gt; After this commit:
      {n,g,}vim -f -c "echo | split | vertical split | 1b | wincmd l | vertical split | 2b | wincmd l | 3b | wincmd j | 4b | tabdo windo diffthis" -c "tabfirst" $LOCAL $BASE $REMOTE $MERGED

  - git mergetool -t vimdiff1

    &gt; Before this commit:
      {n,g,}vim -f -d -c 'echon "..."' $LOCAL $REMOTE

    &gt; After this commit:
      {n,g,}vim -f -c "echo | vertical split | 1b | wincmd l | 3b | tabdo windo diffthis" -c "tabfirst" $LOCAL $BASE $REMOTE $MERGED

  - git mergetool -t vimdiff2

    &gt; Before this commit:
      {n,g,}vim -f -d -c 'wincmd l' $LOCAL $MERGED $REMOTE

    &gt; After this commit:
      {n,g,}vim -f -c "echo | vertical split | 1b | wincmd l | vertical split | 4b | wincmd l | 3b | tabdo windo diffthis" -c "tabfirst" $LOCAL $BASE $REMOTE $MERGED

  - git mergetool -t vimdiff3

    &gt; Before this commit:
      {n,g,}vim -f -d -c 'hid | hid | hid' $LOCAL $REMOTE $BASE $MERGED

    &gt; After this commit:
      {n,g,}vim -f -c "echo | 4b | bufdo diffthis" -c "tabfirst" $LOCAL $BASE $REMOTE $MERGED

Despite being different, I have manually verified that they generate the same
layout as before.

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/xxdiff: prevent segfaults from stopping difftool</title>
<updated>2021-10-13T18:04:04Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2021-10-13T02:45:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=571f4348dd845fd4eccc6b19d93a7b422ed1a466'/>
<id>urn:sha1:571f4348dd845fd4eccc6b19d93a7b422ed1a466</id>
<content type='text'>
Users often use "git difftool HEAD^" to review their work, and have
"mergetool.prompt" set to false so that difftool does not prompt them
before diffing each file.

This is very convenient because users can see all their diffs by
reviewing the xxdiff windows one at a time.

A problem occurs when xxdiff encounters some binary files.
It can segfault and return exit code 128, which is special-cased
by git-difftool-helper as being an extraordinary situation that
aborts the process.

Suppress the exit code from xxdiff in its diff_cmd() implementation
when we see exit code 128 so that the GIT_EXTERNAL_DIFF loop continues
on uninterrupted to the next file rather than aborting when it
encounters the first binary file.

Signed-off-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mergetools/kdiff3: make kdiff3 work on Windows too</title>
<updated>2021-06-08T01:26:16Z</updated>
<author>
<name>Michael Schindler</name>
<email>michael@compressconsult.com</email>
</author>
<published>2021-06-07T20:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=47eb4c689073eddc082007255564e1d3e142b727'/>
<id>urn:sha1:47eb4c689073eddc082007255564e1d3e142b727</id>
<content type='text'>
The native kdiff3 mergetool is not found by git mergetool on
Windows.  The message "The merge tool kdiff3 is not available as
'kdiff3'" is displayed.

Just like we translate the name of the binary and look for it on the
search path for WinMerge, do the same for kdiff3 to find it.

Signed-off-by: Michael Schindler michael@compressconsult.com
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mergetools/vimdiff: add vimdiff1 merge tool variant</title>
<updated>2021-02-23T19:37:13Z</updated>
<author>
<name>Seth House</name>
<email>seth@eseth.com</email>
</author>
<published>2021-02-14T02:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30bb8088afd4502acd2e166ddf7e4b071e53b86d'/>
<id>urn:sha1:30bb8088afd4502acd2e166ddf7e4b071e53b86d</id>
<content type='text'>
This adds yet another vimdiff/gvimdiff variant and presents conflicts as
a two-way diff between 'LOCAL' and 'REMOTE'. 'MERGED' is not opened
which deviates from the norm so usage text is echoed as a Vim message on
startup that instructs the user with how to proceed and how to abort.

Vimdiff is well-suited to two-way diffs so this is an option for a more
simple, more streamlined conflict resolution. For example: it is
difficult to communicate differences across more than two files using
only syntax highlighting; default vimdiff commands to get and put
changes between buffers do not need the user to manually specify
a source or destination buffer when only using two buffers.

Like other merge tools that directly compare 'LOCAL' with 'REMOTE', this
tool will benefit when paired with the new `mergetool.hideResolved`
setting.

Signed-off-by: Seth House &lt;seth@eseth.com&gt;
Tested-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pd/mergetool-nvimdiff'</title>
<updated>2020-11-21T23:14:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-21T23:14:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d203add8925f4744f6bad6b84870988efe108262'/>
<id>urn:sha1:d203add8925f4744f6bad6b84870988efe108262</id>
<content type='text'>
Fix regression introduced when nvimdiff support in mergetool was added.

* pd/mergetool-nvimdiff:
  mergetool: avoid letting `list_tool_variants` break user-defined setups
  mergetools/bc: add `bc4` to the alias list for Beyond Compare
</content>
</entry>
<entry>
<title>mergetools/bc: add `bc4` to the alias list for Beyond Compare</title>
<updated>2020-11-11T21:00:10Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2020-11-11T20:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6bc9082c0fa37d25b7cf9c3ab3c85c78c7a19daf'/>
<id>urn:sha1:6bc9082c0fa37d25b7cf9c3ab3c85c78c7a19daf</id>
<content type='text'>
As of 83bbf9b92ea8 (mergetool--lib: improve support for vimdiff-style
tool variants, 2020-07-29), we already list `bc` and `bc3` as aliases
for that mergetool/difftool.

However, the current Beyond Compare version is _4_, therefore the `bc4`
alias is missing from that list.

Most notably, this is the root cause of the breakage reported in
https://github.com/git-for-windows/git/issues/2893 where a
well-configured `bc4` difftool stopped working as of v2.29.0:
`setup_tool` would notice that after stripping off the trailing digit,
it finds a match in `mergetools/` (the `bc` file), source it, and then
the alias would not match the list offered by the `list_tool_variants`
function, and simply exit without doing anything, but pretending
success.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ls/mergetool-meld-auto-merge'</title>
<updated>2020-09-22T19:36:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-22T19:36:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4aff18a3f02fece0d758427294907e7a80aa6bff'/>
<id>urn:sha1:4aff18a3f02fece0d758427294907e7a80aa6bff</id>
<content type='text'>
The 'meld' backend of the "git mergetool" learned to give the
underlying 'meld' the '--auto-merge' option, which would help
reduce the amount of text that requires manual merging.

* ls/mergetool-meld-auto-merge:
  mergetool: allow auto-merge for meld to follow the vim-diff behavior
</content>
</entry>
<entry>
<title>mergetool: allow auto-merge for meld to follow the vim-diff behavior</title>
<updated>2020-09-17T00:11:20Z</updated>
<author>
<name>Lin Sun</name>
<email>lin.sun@zoom.us</email>
</author>
<published>2020-05-06T23:31:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbd8c09bfe9d783ae01121bafb26a2dd108c0c3f'/>
<id>urn:sha1:dbd8c09bfe9d783ae01121bafb26a2dd108c0c3f</id>
<content type='text'>
Make the mergetool used with "meld" backend behave similarly to "vimdiff" by
telling it to auto-merge non-conflicting parts and highlight the conflicting
parts when `mergetool.meld.useAutoMerge` is configured with `true`, or `auto`
for detecting the `--auto-merge` option automatically.

Helped-by: Đoàn Trần Công Danh &lt;congdanhqx@gmail.com&gt;
Helped-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Lin Sun &lt;lin.sun@zoom.us&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
