diff options
author | John Keeping <john@keeping.me.uk> | 2013-03-29 22:07:39 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-03-29 15:16:04 -0700 |
commit | 67aa147af7c699348ba8c3afe9f7ee88aa043cd0 (patch) | |
tree | 87e429a84f736752799aea0e8e0ecc25ce732a67 /prompt.h | |
parent | t7800: move '--symlinks' specific test to the end (diff) | |
download | tgif-67aa147af7c699348ba8c3afe9f7ee88aa043cd0.tar.xz |
difftool: don't overwrite modified files
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 <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'prompt.h')
0 files changed, 0 insertions, 0 deletions