Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-21 01:26:55 +0300
committerJunio C Hamano <gitster@pobox.com>2022-05-21 01:26:55 +0300
commit2e969751ec29bf948ce8ab3eef111d01b4293a42 (patch)
treefb583b77e158f25f310fdfb85f7e1e777fa88cc5 /t
parent586f23705c639d08fc3c1f1489cdec57e18a1fe9 (diff)
parent8af759374ec174372b841d2f8bc24edcba385418 (diff)
Merge branch 'rs/external-diff-tempfile'
The temporary files fed to external diff command are now generated inside a new temporary directory under the same basename. * rs/external-diff-tempfile: diff: use mks_tempfile_dt() tempfile: add mks_tempfile_dt()
Diffstat (limited to 't')
-rwxr-xr-xt/t4020-diff-external.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh
index 1219f8bd4c..858a5522f9 100755
--- a/t/t4020-diff-external.sh
+++ b/t/t4020-diff-external.sh
@@ -206,17 +206,17 @@ test_expect_success 'GIT_EXTERNAL_DIFF path counter/total' '
'
test_expect_success 'GIT_EXTERNAL_DIFF generates pretty paths' '
+ test_when_finished "git rm -f file.ext" &&
touch file.ext &&
git add file.ext &&
echo with extension > file.ext &&
cat >expect <<-EOF &&
- file.ext file $(git rev-parse --verify HEAD:file) 100644 file.ext $(test_oid zero) 100644
+ file.ext
EOF
GIT_EXTERNAL_DIFF=echo git diff file.ext >out &&
- cut -d" " -f1,3- <out >actual &&
- git update-index --force-remove file.ext &&
- rm file.ext
+ basename $(cut -d" " -f2 <out) >actual &&
+ test_cmp expect actual
'
echo "#!$SHELL_PATH" >fake-diff.sh