<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-difftool.perl, branch v1.7.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.7.11</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.7.11'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2012-04-23T19:00:42Z</updated>
<entry>
<title>difftool: print list of valid tools with '--tool-help'</title>
<updated>2012-04-23T19:00:42Z</updated>
<author>
<name>Tim Henigan</name>
<email>tim.henigan@gmail.com</email>
</author>
<published>2012-03-29T13:39:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=bf73fc212a159210398b6d46ed5e9101c650e7db'/>
<id>urn:sha1:bf73fc212a159210398b6d46ed5e9101c650e7db</id>
<content type='text'>
Since bc7a96a (mergetool--lib: Refactor tools into separate files,
2011-08-18), it is possible to add a new diff tool by creating a simple
script in the '$(git --exec-path)/mergetools' directory.  Updating the
difftool help text is still a manual process, and the documentation can
easily go out of sync.

This commit teaches difftool the '--tool-help' option, which:
  - Reads the list of valid tools from 'mergetools/*'
  - Determines which of them are actually installed
  - Determines which are capable of diffing (i.e. not just a merge tool)
  - Prints the resulting list for the user

Signed-off-by: Tim Henigan &lt;tim.henigan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: teach difftool to handle directory diffs</title>
<updated>2012-04-23T18:59:34Z</updated>
<author>
<name>Tim Henigan</name>
<email>tim.henigan@gmail.com</email>
</author>
<published>2012-04-23T18:23:41Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7e0abcec103b3649943b236881cf88e8fd6cf3a4'/>
<id>urn:sha1:7e0abcec103b3649943b236881cf88e8fd6cf3a4</id>
<content type='text'>
When 'difftool' is called to compare a range of commits that modify
more than one file, it opens a separate instance of the diff tool for
each file that changed.

The new '--dir-diff' option copies all the modified files to a temporary
location and runs a directory diff on them in a single instance of the
diff tool.

Signed-off-by: Tim Henigan &lt;tim.henigan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: eliminate setup_environment function</title>
<updated>2012-03-23T18:46:26Z</updated>
<author>
<name>Tim Henigan</name>
<email>tim.henigan@gmail.com</email>
</author>
<published>2012-03-22T19:52:21Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=e9653615fafcbac6109da99fac4fa66b0b432048'/>
<id>urn:sha1:e9653615fafcbac6109da99fac4fa66b0b432048</id>
<content type='text'>
Removing this function shortens the code and makes it easier to read.
Now all environment variables are set as part of procedural operation.

Signed-off-by: Tim Henigan &lt;tim.henigan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: stop appending '.exe' to git</title>
<updated>2012-03-23T18:46:26Z</updated>
<author>
<name>Tim Henigan</name>
<email>tim.henigan@gmail.com</email>
</author>
<published>2012-03-22T19:52:20Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=11bf87076a686dbfe696dd21333486cab55e6fbb'/>
<id>urn:sha1:11bf87076a686dbfe696dd21333486cab55e6fbb</id>
<content type='text'>
The system call to Git works the same whether or not ".exe" is
appended to "git". The extra code is not necessary.

Signed-off-by: Tim Henigan &lt;tim.henigan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: remove explicit change of PATH</title>
<updated>2012-03-23T18:46:26Z</updated>
<author>
<name>Tim Henigan</name>
<email>tim.henigan@gmail.com</email>
</author>
<published>2012-03-22T19:52:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=db607087d0f1256b745b9a878623060d775f1817'/>
<id>urn:sha1:db607087d0f1256b745b9a878623060d775f1817</id>
<content type='text'>
Adding the script directory to PATH is not needed. The script is
located at '$(git --exec-path)', which is already on the PATH.

Signed-off-by: Tim Henigan &lt;tim.henigan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: exit(0) when usage is printed</title>
<updated>2012-03-23T18:46:26Z</updated>
<author>
<name>Tim Henigan</name>
<email>tim.henigan@gmail.com</email>
</author>
<published>2012-03-22T19:52:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=283607694c1248a8e1ff4cda48aa5d1eb1287733'/>
<id>urn:sha1:283607694c1248a8e1ff4cda48aa5d1eb1287733</id>
<content type='text'>
Prior to this commit, the script exited with an error whenever the
usage string was printed, regardless of the reason it was done. In
cases where usage was printed due to a user request (e.g. '-h'
option), the script should exit without error (exit 0).

This commit adds an argument to the usage function that allows the
exit code to be specified when the function is called.

Signed-off-by: Tim Henigan &lt;tim.henigan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: add '--no-gui' option</title>
<updated>2012-03-23T18:46:25Z</updated>
<author>
<name>Tim Henigan</name>
<email>tim.henigan@gmail.com</email>
</author>
<published>2012-03-22T19:52:17Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=850896042a42c1c16912a3981ca844e2cbcd14d4'/>
<id>urn:sha1:850896042a42c1c16912a3981ca844e2cbcd14d4</id>
<content type='text'>
This commit teaches difftool to handle the '--no-gui' option. This option
negates the existing '--gui' option. The last setting given on the command
line wins.

This allows a user to configure "[alias] mdt = difftool --gui", but still
have the ability to override the setting without error:

$ git mdt --no-gui

Signed-off-by: Tim Henigan &lt;tim.henigan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: parse options using Getopt::Long</title>
<updated>2012-03-23T18:46:25Z</updated>
<author>
<name>Tim Henigan</name>
<email>tim.henigan@gmail.com</email>
</author>
<published>2012-03-22T19:52:16Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3f94ff755e266520ba2f6007d557395c33d30fdc'/>
<id>urn:sha1:3f94ff755e266520ba2f6007d557395c33d30fdc</id>
<content type='text'>
Replace custom option/argument parser with standard Getopt::Long
module.  This shortens the code and makes it easier to understand.

Signed-off-by: Tim Henigan &lt;tim.henigan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use -h for synopsis and --help for manpage consistently</title>
<updated>2011-10-05T17:47:10Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2011-10-03T18:21:36Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=87182b17ed471a7b9cbbc24e1c02f90c8725dc6f'/>
<id>urn:sha1:87182b17ed471a7b9cbbc24e1c02f90c8725dc6f</id>
<content type='text'>
A few scripted Porcelain implementations pretend as if the routine to show
their own help messages are triggered upon "git cmd --help", but a command
line parser of "git" will hijack such a request and shows the manpage for
the cmd subcommand.

Leaving the code to handle such input is simply misleading.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: Fix failure on Cygwin</title>
<updated>2010-12-14T19:13:41Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2010-12-14T18:27:48Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d531174fe386af00755619d6a204db74a30954f8'/>
<id>urn:sha1:d531174fe386af00755619d6a204db74a30954f8</id>
<content type='text'>
In particular, test 14 'difftool last flag wins' in t7800 fails.
This is caused by git-difftool.perl passing both GIT_DIFFTOOL_NO_PROMPT
(='true') and GIT_DIFFTOOL_PROMPT (='true') to the difftool helper
script. Despite the appropriate key being deleted from the ENV
hash, it seems that once a key has been set in the hash, it gets
passed along to the system() call. (ie deleting the key does not
do the equivalent of unsetenv()).

In order to fix the problem, we keep track of the required prompt
state while processing the arguments, and then set the relevant
ENV hash key only once at the end.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
