<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-difftool.perl, branch v2.9.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-05-16T21:53:05Z</updated>
<entry>
<title>difftool: handle unmerged files in dir-diff mode</title>
<updated>2016-05-16T21:53:05Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2016-05-16T18:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=366f9cea18fbb7ebb0a75735da8c2a9d5a916809'/>
<id>urn:sha1:366f9cea18fbb7ebb0a75735da8c2a9d5a916809</id>
<content type='text'>
When files are unmerged they can show up as both unmerged and
modified in the output of `git diff --raw`.  This causes
difftool's dir-diff to create filesystem entries for the same
path twice, which fails when it encounters a duplicate path.

Ensure that each worktree path is only processed once.
Add a test to demonstrate the breakage.

Reported-by: Jan Smets &lt;jan@smets.cx&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>difftool: initialize variables for readability</title>
<updated>2016-05-16T21:53:03Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2016-05-16T18:05:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=951b551d0f349f145f8606b946d64fc452ad6a51'/>
<id>urn:sha1:951b551d0f349f145f8606b946d64fc452ad6a51</id>
<content type='text'>
The code always goes into one of the two conditional blocks but make it
clear that not doing so is an error condition by setting $ok to 0.

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>difftool: ignore symbolic links in use_wt_file</title>
<updated>2015-10-29T20:43:10Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2015-10-29T18:19:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cfe2d4be9126f03d8ca198f9da36762cdf59b52f'/>
<id>urn:sha1:cfe2d4be9126f03d8ca198f9da36762cdf59b52f</id>
<content type='text'>
The caller is preparing a narrowed-down copy of the working tree and
this function is asked if the path should be included in that copy.
If we say yes, the path from the working tree will be either symlinked
or copied into the narrowed-down copy.

For any path that is a symbolic link, the caller later fixes up the
narrowed-down copy by unlinking the path and replacing it with a
regular file it writes out that mimics the way how "git diff"
compares symbolic links.

Let's answer "no, you do not want to copy/symlink the working tree
file" for all symbolic links from this function, as we know the
result will not be used because it will be overwritten anyway.

Incidentally, this also stops the function from feeding a symbolic
link in the working tree to hash-object, which is a wrong thing to
do to begin with. The link may be pointing at a directory, or worse
may be dangling (both would be noticed as an error).  Even if the
link points at a regular file, hashing the contents of a file that
is pointed at by the link is not correct (Git hashes the contents of
the link itself, not the pointee).

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>Merge branch 'da/difftool'</title>
<updated>2014-10-29T17:09:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-29T17:09:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ce57f12280eb6a95043e28ad68ff2b6c70c09ad'/>
<id>urn:sha1:9ce57f12280eb6a95043e28ad68ff2b6c70c09ad</id>
<content type='text'>
Allow diff tool backend to stop early by exiting with a non-zero
status.

* da/difftool:
  difftool: add support for --trust-exit-code
  difftool--helper: exit when reading a prompt answer fails
</content>
</entry>
<entry>
<title>difftool: add support for --trust-exit-code</title>
<updated>2014-10-28T17:36:57Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2014-10-27T01:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b52123fcf840686b69e10807fd0f985ec4167f3'/>
<id>urn:sha1:2b52123fcf840686b69e10807fd0f985ec4167f3</id>
<content type='text'>
Teach difftool to exit when a diff tool returns a non-zero exit
code when either --trust-exit-code is specified or
difftool.trustExitCode is true.

Forward exit codes from invoked diff tools to the caller when
--trust-exit-code is used.

Suggested-by: Adri Farr &lt;14farresa@gmail.com&gt;
Helped-by: Johannes Sixt &lt;j6t@kdbg.org&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>difftool: don't assume that default sh is sane</title>
<updated>2014-10-15T21:12:20Z</updated>
<author>
<name>Charles Bailey</name>
<email>cbailey32@bloomberg.net</email>
</author>
<published>2014-10-11T08:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4fb4b02d98310f4f859f7d52f57f36d49198be5c'/>
<id>urn:sha1:4fb4b02d98310f4f859f7d52f57f36d49198be5c</id>
<content type='text'>
git-difftool used to create a command list script containing $( ... )
and explicitly calls "sh -c" with this list.

Instead, allow mergetool --tool-help to take a mode parameter and call
mergetool directly to invoke the show_tool_help function. This mode
parameter is intented for use solely by difftool.

Signed-off-by: Charles Bailey &lt;cbailey32@bloomberg.net&gt;
Helped-by: John Keeping &lt;john@keeping.me.uk&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>difftool: support repositories with .git-files</title>
<updated>2014-02-24T17:53:57Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2014-02-24T03:12:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=94eaa806519498de2ca59a424b013812d72d21c5'/>
<id>urn:sha1:94eaa806519498de2ca59a424b013812d72d21c5</id>
<content type='text'>
Modern versions of "git submodule" use .git-files to setup the
submodule directory.  When run in a "git submodule"-created
repository "git difftool --dir-diff" dies with the following
error:

	$ git difftool -d HEAD~
	fatal: This operation must be run in a work tree
	diff --raw --no-abbrev -z HEAD~: command returned error: 128

core.worktree is relative to the .git directory but the logic
in find_worktree() does not account for it.

Use `git rev-parse --show-toplevel` to find the worktree so that
the dir-diff feature works inside a submodule.

Reported-by: Gábor Lipták &lt;gabor.liptak@gmail.com&gt;
Helped-by: Jens Lehmann &lt;jens.lehmann@web.de&gt;
Helped-by: John Keeping &lt;john@keeping.me.uk&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>difftool --dir-diff: allow changing any clean working tree file</title>
<updated>2013-05-29T19:50:08Z</updated>
<author>
<name>Kenichi Saita</name>
<email>nitoyon@gmail.com</email>
</author>
<published>2013-05-29T16:01:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=32eaf1de7f79c4ba09f3de3261c84e52e0a67af5'/>
<id>urn:sha1:32eaf1de7f79c4ba09f3de3261c84e52e0a67af5</id>
<content type='text'>
The temporary directory prepared by "difftool --dir-diff" to
show the result of a change can be modified by the user via
the tree diff program, and we try hard not to lose changes
to them after tree diff program returns to us.

However, the set of files to be copied back is computed
differently between --symlinks and --no-symlinks modes.  The
former checks all paths that start out as identical to the
working tree file, while the latter checks paths that
already had a local modification in the working tree,
allowing changes made in the tree diff program to paths that
did not have any local change to be lost.

Signed-off-by: Kenichi Saita &lt;nitoyon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: fix dir-diff when file does not exist in working tree</title>
<updated>2013-05-17T18:46:53Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2013-05-17T18:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f197a1de497db8898c9920fab77533dab34a03c'/>
<id>urn:sha1:1f197a1de497db8898c9920fab77533dab34a03c</id>
<content type='text'>
Commit 02c5631 (difftool --dir-diff: symlink all files matching the
working tree, 2013-03-14) does not handle the case where a file that is
being compared does not exist in the working tree.  Fix this by checking
for existence explicitly before running git-hash-object.

Reported-by: Kevin Bracey &lt;kevin@bracey.fi&gt;
Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>difftool: don't overwrite modified files</title>
<updated>2013-03-29T22:16:04Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2013-03-29T22:07:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=67aa147af7c699348ba8c3afe9f7ee88aa043cd0'/>
<id>urn:sha1:67aa147af7c699348ba8c3afe9f7ee88aa043cd0</id>
<content type='text'>
After running the user's diff tool, git-difftool will copy any files
that differ between the working tree and the temporary tree.  This is
useful when the user edits the file in their diff tool but is wrong if
they edit the working tree file while examining the diff.

Instead of copying unconditionally when the files differ, create and
index from the working tree files and only copy the temporary file back
if it was modified and the working tree file was not.  If both files
have been modified, print a warning and exit with an error.

Note that we cannot use an existing index in git-difftool since those
contain the modified files that need to be checked out but here we are
looking at those files which are copied from the working tree and not
checked out.  These are precisely the files which are not in the
existing indices.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
