diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-06-14 07:33:26 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-06-14 07:33:26 +0300 |
commit | f4f7304b443a52af9fdbbf15092516c061de4aeb (patch) | |
tree | a739f2b1b3ae7a1611a8423104bcc1f13915c80f /t | |
parent | 135997254a87f527bc7b29fa1803d9e0da517551 (diff) | |
parent | 6aacb7d8619c50b3c92fe3e99b93ffa9b6065dfc (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-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 |