diff options
Diffstat (limited to 't/t5605-clone-local.sh')
-rwxr-xr-x | t/t5605-clone-local.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5605-clone-local.sh b/t/t5605-clone-local.sh index 7d63365..21ab619 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 |