mirror of
https://github.com/git/git.git
synced 2025-04-11 07:56:48 +00:00
clone: add test for push on an empty clone.
Commit 55f0566 (get_local_heads(): do not return random pointer if there is no head, 2009-04-17) fixed a segfault for git push, this patch adds a test-case to avoid future regressions. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
34779c535c
commit
a162e78df0
@ -132,4 +132,14 @@ test_expect_success 'clone empty repository' '
|
||||
test $actual = $expected)
|
||||
'
|
||||
|
||||
test_expect_success 'clone empty repository, and then push should not segfault.' '
|
||||
cd "$D" &&
|
||||
rm -fr empty/ empty-clone/ &&
|
||||
mkdir empty &&
|
||||
(cd empty && git init) &&
|
||||
git clone empty empty-clone &&
|
||||
cd empty-clone &&
|
||||
test_must_fail git push
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Loading…
x
Reference in New Issue
Block a user