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:
authorJunio C Hamano <gitster@pobox.com>2022-05-21 01:26:52 +0300
committerJunio C Hamano <gitster@pobox.com>2022-05-21 01:26:52 +0300
commitf5203a4220759e824e187082db3f4f09a3e0e570 (patch)
treecb8138830acf9f12779c361330f6d9ea72274786 /t
parent1256a25ecd5df8fb418a537d856bf442da984c17 (diff)
parentd097a23bfaa85b4f37c771d30358e8fb5adacd7f (diff)
Merge branch 'ds/do-not-call-bug-on-bad-refs'
Code clean-up. * ds/do-not-call-bug-on-bad-refs: clone: die() instead of BUG() on bad refs
Diffstat (limited to 't')
-rwxr-xr-xt/t5605-clone-local.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh
index 7d63365f93..21ab619283 100755
--- a/t/t5605-clone-local.sh
+++ b/t/t5605-clone-local.sh
@@ -141,4 +141,13 @@ test_expect_success 'cloning locally respects "-u" for fetching refs' '
test_must_fail git clone --bare -u false a should_not_work.git
'
+test_expect_success 'local clone from repo with corrupt refs fails gracefully' '
+ git init corrupt &&
+ test_commit -C corrupt one &&
+ echo a >corrupt/.git/refs/heads/topic &&
+
+ test_must_fail git clone corrupt working 2>err &&
+ grep "has a null OID" err
+'
+
test_done