diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-06-14 13:33:26 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-06-14 13:33:26 +0900 |
commit | f4f7304b443a52af9fdbbf15092516c061de4aeb (patch) | |
tree | a739f2b1b3ae7a1611a8423104bcc1f13915c80f /t | |
parent | Merge branch 'ga/send-email-sendmail-cmd' (diff) | |
parent | clone: clean up directory after transport_fetch_refs() failure (diff) | |
download | tgif-f4f7304b443a52af9fdbbf15092516c061de4aeb.tar.xz |
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-x | t/t5600-clone-fail-cleanup.sh | 7 |
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 |