diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-04-16 23:29:34 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-16 23:29:34 -0700 |
commit | 7b612c966ec3ee68fb60410db06222b7d728f965 (patch) | |
tree | b8499e5afa7927424abde334f2150524e3210389 /t | |
parent | Merge branch 'sb/unpack-trees-would-lose-submodule-message-update' (diff) | |
parent | difftool: fix use-after-free (diff) | |
download | tgif-7b612c966ec3ee68fb60410db06222b7d728f965.tar.xz |
Merge branch 'js/difftool-builtin'
Code cleanup.
* js/difftool-builtin:
difftool: fix use-after-free
difftool: avoid strcpy
Diffstat (limited to 't')
-rwxr-xr-x | t/t7800-difftool.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index 0e7f30db2d..7f09867478 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -393,6 +393,25 @@ test_expect_success 'setup change in subdirectory' ' git commit -m "modified both" ' +test_expect_success 'difftool -d with growing paths' ' + a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa && + git init growing && + ( + cd growing && + echo "test -f \"\$2/b\"" | write_script .git/test-for-b.sh && + one=$(printf 1 | git hash-object -w --stdin) && + two=$(printf 2 | git hash-object -w --stdin) && + git update-index --add \ + --cacheinfo 100644,$one,$a --cacheinfo 100644,$two,b && + tree1=$(git write-tree) && + git update-index --add \ + --cacheinfo 100644,$two,$a --cacheinfo 100644,$one,b && + tree2=$(git write-tree) && + git checkout -- $a && + git difftool -d --extcmd .git/test-for-b.sh $tree1 $tree2 + ) +' + run_dir_diff_test () { test_expect_success "$1 --no-symlinks" " symlinks=--no-symlinks && |