difftool: Use symlinks when diffing against the worktree
Teach difftool's --dir-diff mode to use symlinks to represent
files from the working copy, and make it the default behavior
for the non-Windows platforms.
Using symlinks is simpler and safer since we do not need to
worry about copying files back into the worktree.
The old behavior is still available as --no-symlinks.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
David Aguilar13 years agocommitted byJunio C Hamano
@ -66,6 +66,14 @@ of the diff post-image. `$MERGED` is the name of the file which is
@@ -66,6 +66,14 @@ of the diff post-image. `$MERGED` is the name of the file which is
being compared. `$BASE` is provided for compatibility
with custom merge tool commands and has the same value as `$MERGED`.
--symlinks::
--no-symlinks::
'git difftool''s default behavior is create symlinks to the
working tree when run in `--dir-diff` mode.
+
Specifying `--no-symlinks` instructs 'git difftool' to create
copies instead. `--no-symlinks` is the default on Windows.
--tool-help::
Print a list of diff tools that may be used with `--tool`.