summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-06-06 12:18:47 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-06-06 12:18:47 -0700
commit2fc0c022e60f54be55d6065b9a8abccdc0f67bab (patch)
treed3d9bf5d28501b57fd4130c05f9da212c0784936 /t
parentMerge branch 'fc/show-branch-in-rebase-am' (diff)
parentdifftool --dir-diff: allow changing any clean working tree file (diff)
downloadtgif-2fc0c022e60f54be55d6065b9a8abccdc0f67bab.tar.xz
Merge branch 'ks/difftool-dir-diff-copy-fix'
"difftool --dir-diff" did not copy back changes made by the end-user in the diff tool backend to the working tree in some cases. * 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 d46f0411bd..2418528487 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