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>2021-06-14 07:33:26 +0300
committerJunio C Hamano <gitster@pobox.com>2021-06-14 07:33:26 +0300
commitf4f7304b443a52af9fdbbf15092516c061de4aeb (patch)
treea739f2b1b3ae7a1611a8423104bcc1f13915c80f /t
parent135997254a87f527bc7b29fa1803d9e0da517551 (diff)
parent6aacb7d8619c50b3c92fe3e99b93ffa9b6065dfc (diff)
Merge branch 'jk/clone-clean-upon-transport-error'
Recent "git clone" left a temporary directory behind when the transport layer returned an failure. * jk/clone-clean-upon-transport-error: clone: clean up directory after transport_fetch_refs() failure
Diffstat (limited to 't')
-rwxr-xr-xt/t5600-clone-fail-cleanup.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index 4a1a912e03..5bf10261d3 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -97,4 +97,11 @@ test_expect_success 'failed clone into empty leaves directory (separate, wt)' '
test_dir_is_empty empty-wt
'
+test_expect_success 'transport failure cleans up directory' '
+ test_must_fail git clone --no-local \
+ -u "f() { git-upload-pack \"\$@\"; return 1; }; f" \
+ foo broken-clone &&
+ test_path_is_missing broken-clone
+'
+
test_done