mirror of
https://github.com/git/git.git
synced 2026-01-24 01:15:17 +00:00
squash! git bundle create <bundle> leaks handle the revlist is empty.
bundle: refuse to create empty bundle When an user tries to create an empty bundle via `git bundle create <bundle> <revlist>` where <revlist> resolves to an empty list (for example, like `master..master`), the command fails and warns the user about how it don't want to create empty bundle. However, on Windows the .lock file was still open and could not be deleted properly. This patch fixes that issue. This closes https://github.com/git-for-windows/git/issues/790 Signed-off-by: Gaël Lhez <gael.lhez@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Johannes Schindelin
parent
bf6c15ca9c
commit
a66f67b183
@@ -71,4 +71,8 @@ test_expect_success 'prerequisites with an empty commit message' '
|
||||
git bundle verify bundle
|
||||
'
|
||||
|
||||
test_expect_success 'try to create a bundle with empty ref count' '
|
||||
test_expect_code 1 git bundle create foobar.bundle master..master
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
test_description='
|
||||
test git-bundle under git for Windows
|
||||
|
||||
When we select an empty set of commit (like git bundle create foobar.bundle master..master),
|
||||
we should not have problem with the foobar.bundle.lock being locked (especially on Windows).
|
||||
'
|
||||
|
||||
. ./test-lib.sh
|
||||
|
||||
test_expect_failure 'try to create a bundle with empty ref count' '
|
||||
git bundle create foobar.bundle master..master
|
||||
'
|
||||
|
||||
test_done
|
||||
Reference in New Issue
Block a user