Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-03-26 00:23:59 +0400
committerJunio C Hamano <gitster@pobox.com>2013-03-28 00:47:15 +0400
commit0aac7bb287645dd72ad8ad6b805128b8ff7f111f (patch)
tree72fde031f0cd01787d5d531f257a920006dd9336 /t
parent0e15ad9b730a1516f8a786523266707c4d26f5ab (diff)
clone: die on errors from unpack_trees
When clone is populating the working tree, it ignores the return status from unpack_trees; this means we may report a successful clone, even when the checkout fails. When checkout fails, we may want to leave the $GIT_DIR in place, as it might be possible to recover the data through further use of "git checkout" (e.g., if the checkout failed due to a transient error, disk full, etc). However, we already die on a number of other checkout-related errors, so this patch follows that pattern. In addition to marking a now-passing test, we need to adjust t5710, which blindly assumed it could make bogus clones of very deep alternates hierarchies. By using "--bare", we can avoid it actually touching any objects. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t1060-object-corruption.sh2
-rwxr-xr-xt/t5710-info-alternate.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/t/t1060-object-corruption.sh b/t/t1060-object-corruption.sh
index e29406e27a..4e7030e613 100755
--- a/t/t1060-object-corruption.sh
+++ b/t/t1060-object-corruption.sh
@@ -89,7 +89,7 @@ test_expect_success 'clone --local detects corruption' '
test_must_fail git clone --local bit-error corrupt-checkout
'
-test_expect_failure 'clone --local detects missing objects' '
+test_expect_success 'clone --local detects missing objects' '
test_must_fail git clone --local missing missing-checkout
'
diff --git a/t/t5710-info-alternate.sh b/t/t5710-info-alternate.sh
index aa045295de..5a6e49d18d 100755
--- a/t/t5710-info-alternate.sh
+++ b/t/t5710-info-alternate.sh
@@ -58,7 +58,7 @@ test_expect_success 'creating too deep nesting' \
git clone -l -s D E &&
git clone -l -s E F &&
git clone -l -s F G &&
-git clone -l -s G H'
+git clone --bare -l -s G H'
test_expect_success 'invalidity of deepest repository' \
'cd H && {