<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/git-mergetool--lib.sh, branch v2.7.0-rc2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.7.0-rc2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v2.7.0-rc2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2015-06-19T18:20:52Z</updated>
<entry>
<title>mergetool-lib: fix default tool selection</title>
<updated>2015-06-19T18:20:52Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2015-06-19T09:30:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f67986b9098c21005f33182472a990d5c6e8a98d'/>
<id>urn:sha1:f67986b9098c21005f33182472a990d5c6e8a98d</id>
<content type='text'>
When no diff nor merge tool is specified (config, option), mergetool-lib
is supposed to choose a default tool from a set of tools. That set is
constructed dynamically depending on the environment (graphical, editor
setting) as a space separated string of tool names.

719518f (mergetool--lib: set IFS for difftool and mergetool, 2015-05-20)
introduced a newline as IFS which breaks the parsing of the space
separated list into items, resulting in a failed search for an available
tool.

Set IFS to a space locally for the tool search.

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mergetool--lib: set IFS for difftool and mergetool</title>
<updated>2015-05-20T20:13:42Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2015-05-20T09:07:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=719518f5cebba0fb4ed6caf6d92d683e858120f0'/>
<id>urn:sha1:719518f5cebba0fb4ed6caf6d92d683e858120f0</id>
<content type='text'>
git-sh-setup sets IFS but it is not used by git-difftool--helper.
Set IFS in git-mergetool--lib so that the mergetool scriptlets,
difftool, and mergetool do not need to do so.

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>mergetool--lib: remove use of $status global</title>
<updated>2014-11-21T19:27:53Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2014-11-21T01:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1b6a53431c0ffba4fb2428ef09018a5e889f52f8'/>
<id>urn:sha1:1b6a53431c0ffba4fb2428ef09018a5e889f52f8</id>
<content type='text'>
Remove return statements and rework check_unchanged() so that the exit
status from the last evaluated expression bubbles up to the callers.

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>mergetool--lib: remove no-op assignment to $status from setup_user_tool</title>
<updated>2014-11-21T19:27:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-11-21T19:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e00e13e2aa5e94dc77dedb8f2026198300c7c8fe'/>
<id>urn:sha1:e00e13e2aa5e94dc77dedb8f2026198300c7c8fe</id>
<content type='text'>
Even though setup_user_tool assigns the exit status from "eval
$merge_tool_cmd" to $status, the variable is overwritten by the
function it calls next, check_unchanged, without ever getting looked
at by anybody.  And "return $status" at the end of this function
returns the value check_unchanged assigned to it (which is the same
as the value the function returns).  Which makes the assignment a
no-op.

Remove it.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'da/difftool'</title>
<updated>2014-11-18T18:16:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-11-18T18:16:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3f78278beb9792368de7edbbb031c3a88e0038a1'/>
<id>urn:sha1:3f78278beb9792368de7edbbb031c3a88e0038a1</id>
<content type='text'>
Fix-up to a new feature in 'master'.

* da/difftool:
  difftool: honor --trust-exit-code for builtin tools
</content>
</entry>
<entry>
<title>difftool: honor --trust-exit-code for builtin tools</title>
<updated>2014-11-14T21:40:38Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2014-11-14T21:33:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=99474b6340dbcbe58f6c256fdee231cbadb060f4'/>
<id>urn:sha1:99474b6340dbcbe58f6c256fdee231cbadb060f4</id>
<content type='text'>
run_merge_tool() was not setting $status, which prevented the
exit code for builtin tools from being forwarded to the caller.

Capture the exit status and add a test to guarantee the behavior.

Reported-by: Adria Farres &lt;14farresa@gmail.com&gt;
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>mergetool: rename bc3 to bc</title>
<updated>2014-10-21T18:25:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-20T22:49:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f13f9b0eab8ec4880be0e4423ebdcfdbcd41eeb6'/>
<id>urn:sha1:f13f9b0eab8ec4880be0e4423ebdcfdbcd41eeb6</id>
<content type='text'>
Beyond Compare version 4 works the same way as version 3, so rename
the existing "bc3" adaptor to just "bc", while keeping "bc3" as a
backward compatible wrapper.

Noticed-by: Olivier Croquette &lt;ocroquette@free.fr&gt;
Helped-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remove #!interpreter line from shell libraries</title>
<updated>2013-11-26T22:23:56Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2013-11-25T21:03:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=11d62145b904b81013d1ad558d68a74e22e81a91'/>
<id>urn:sha1:11d62145b904b81013d1ad558d68a74e22e81a91</id>
<content type='text'>
In a shell snippet meant to be sourced by other shell scripts, an
opening #! line does more harm than good.

The harm:

 - When the shell library is sourced, the interpreter and options from
   the #! line are not used.  Specifying a particular shell can
   confuse the reader into thinking it is safe for the shell library
   to rely on idiosyncrasies of that shell.

 - Using #! instead of a plain comment drops a helpful visual clue
   that this is a shell library and not a self-contained script.

 - Tools such as lintian can use a #! line to tell when an
   installation script has failed by forgetting to set a script
   executable.  This check does not work if shell libraries also start
   with a #! line.

The good:

 - Text editors notice the #! line and use it for syntax highlighting
   if you try to edit the installed scripts (without ".sh" suffix) in
   place.

The use of the #! for file type detection is not needed because Git's
shell libraries are meant to be edited in source form (with ".sh"
suffix).  Replace the opening #! lines with comments.

This involves tweaking the test harness's valgrind support to find
shell libraries by looking for "# " in the first line instead of "#!"
(see v1.7.6-rc3~7, 2011-06-17).

Suggested by Russ Allbery through lintian.  Thanks to Jeff King and
Clemens Buchacher for further analysis.

Tested by searching for non-executable scripts with #! line:

	find . -name .git -prune -o -type f -not -executable |
	while read file
	do
		read line &lt;"$file"
		case $line in
		'#!'*)
			echo "$file"
			;;
		esac
	done

The only remaining scripts found are templates for shell scripts
(unimplemented.sh, wrap-for-bin.sh) and sample input used in tests
(t/t4034/perl/{pre,post}).

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mergetool--lib: Fix typo in the merge/difftool help</title>
<updated>2013-10-14T23:28:38Z</updated>
<author>
<name>Stefan Saasen</name>
<email>ssaasen@atlassian.com</email>
</author>
<published>2013-10-04T14:34:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2b7ca916fcffafe9cfd967cce87436a9372ae969'/>
<id>urn:sha1:2b7ca916fcffafe9cfd967cce87436a9372ae969</id>
<content type='text'>
The help text for the `tool` flag should mention:

    --tool=&lt;tool&gt;

instead of:

    --tool-&lt;tool&gt;

Signed-off-by: Stefan Saasen &lt;ssaasen@atlassian.com&gt;
Reviewed-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
</content>
</entry>
<entry>
<title>mergetools/diffmerge: support DiffMerge as a git mergetool</title>
<updated>2013-10-13T23:00:57Z</updated>
<author>
<name>Stefan Saasen</name>
<email>ssaasen@atlassian.com</email>
</author>
<published>2013-10-12T22:29:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c5f424fd014488bd8a92b97f52bfe47823bc2128'/>
<id>urn:sha1:c5f424fd014488bd8a92b97f52bfe47823bc2128</id>
<content type='text'>
DiffMerge is a non-free (but gratis) tool that supports OS X, Windows and Linux.

    See http://www.sourcegear.com/diffmerge/

DiffMerge includes a script `/usr/bin/diffmerge` that can be used to launch the
graphical compare tool.

This change adds mergetool support for DiffMerge and adds 'diffmerge' as an
option to the mergetool help.

Signed-off-by: Stefan Saasen &lt;ssaasen@atlassian.com&gt;
Acked-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
</content>
</entry>
</feed>
