From a66f67b1838d41bc6e7dfdd94361e36e5c91aaf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Lhez?= Date: Wed, 22 Jun 2016 23:30:18 +0200 Subject: [PATCH] squash! `git bundle create ` leaks handle the revlist is empty. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bundle: refuse to create empty bundle When an user tries to create an empty bundle via `git bundle create ` where 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 Signed-off-by: Johannes Schindelin --- t/t5607-clone-bundle.sh | 4 ++++ t/tgfw790-git-bundle.sh | 15 --------------- 2 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 t/tgfw790-git-bundle.sh diff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh index 348d9b3bc7..f84b875950 100755 --- a/t/t5607-clone-bundle.sh +++ b/t/t5607-clone-bundle.sh @@ -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 diff --git a/t/tgfw790-git-bundle.sh b/t/tgfw790-git-bundle.sh deleted file mode 100644 index 6bfa23c141..0000000000 --- a/t/tgfw790-git-bundle.sh +++ /dev/null @@ -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