summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-27 21:38:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-27 21:38:23 (GMT)
commit88f90f8286e9e456ea332e00f87ad39892103544 (patch)
treeadc94f5e7e6fa961ccfffb7197fc0df0b664e3a4 /t
parent6be17ec5828386c3ae17af26fac66f65f1c817ec (diff)
parent32eaf1de7f79c4ba09f3de3261c84e52e0a67af5 (diff)
downloadgit-88f90f8286e9e456ea332e00f87ad39892103544.zip
git-88f90f8286e9e456ea332e00f87ad39892103544.tar.gz
git-88f90f8286e9e456ea332e00f87ad39892103544.tar.bz2
Merge branch 'ks/difftool-dir-diff-copy-fix' into maint
* ks/difftool-dir-diff-copy-fix: difftool --dir-diff: allow changing any clean working tree file
Diffstat (limited to 't')
-rwxr-xr-xt/t7800-difftool.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index d46f041..2418528 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -385,6 +385,25 @@ test_expect_success PERL,SYMLINKS 'difftool --dir-diff --symlink without unstage
test_cmp actual expect
'
+write_script modify-right-file <<\EOF
+echo "new content" >"$2/file"
+EOF
+
+run_dir_diff_test 'difftool --dir-diff syncs worktree with unstaged change' '
+ test_when_finished git reset --hard &&
+ echo "orig content" >file &&
+ git difftool -d $symlinks --extcmd "$(pwd)/modify-right-file" branch &&
+ echo "new content" >expect &&
+ test_cmp expect file
+'
+
+run_dir_diff_test 'difftool --dir-diff syncs worktree without unstaged change' '
+ test_when_finished git reset --hard &&
+ git difftool -d $symlinks --extcmd "$(pwd)/modify-right-file" branch &&
+ echo "new content" >expect &&
+ test_cmp expect file
+'
+
write_script modify-file <<\EOF
echo "new content" >file
EOF