summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-18 09:23:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-18 09:23:59 (GMT)
commit9e3dc6bfb2756f9da7ddb64a1d9e41a22aa11e9b (patch)
tree352407e77e35633cd1a63cca1c6d05275cb5f323 /t
parent4520c233742cca267e1c0ba55f04f35ef7e9baf7 (diff)
parent2c8ee1f53c7048aa391ac810306bf4cb8e15f2bc (diff)
downloadgit-9e3dc6bfb2756f9da7ddb64a1d9e41a22aa11e9b.zip
git-9e3dc6bfb2756f9da7ddb64a1d9e41a22aa11e9b.tar.gz
git-9e3dc6bfb2756f9da7ddb64a1d9e41a22aa11e9b.tar.bz2
Merge branch 'jk/close-duped-fd-before-unlock-for-bundle'
When "git bundle" aborts due to an empty commit ranges (i.e. resulting in an empty pack), it left a file descriptor to an lockfile open, which resulted in leftover lockfile on Windows where you cannot remove a file with an open file descriptor. This has been corrected. * jk/close-duped-fd-before-unlock-for-bundle: bundle: dup() output descriptor closer to point-of-use
Diffstat (limited to 't')
-rwxr-xr-xt/t5607-clone-bundle.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh
index 348d9b3..cf39e9e 100755
--- a/t/t5607-clone-bundle.sh
+++ b/t/t5607-clone-bundle.sh
@@ -71,4 +71,10 @@ test_expect_success 'prerequisites with an empty commit message' '
git bundle verify bundle
'
+test_expect_success 'failed bundle creation does not leave cruft' '
+ # This fails because the bundle would be empty.
+ test_must_fail git bundle create fail.bundle master..master &&
+ test_path_is_missing fail.bundle.lock
+'
+
test_done