diff options
author | Clemens Buchacher <drizzd@aon.at> | 2009-05-27 22:13:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-27 23:16:16 -0700 |
commit | 6a01554e6350123c78de805d820e90f1c56e5fdc (patch) | |
tree | 512631158643b30cda638d18e1ca0ee70a7d3a8e /t/t5505-remote.sh | |
parent | e57cb0158209ece040a4b873064504efd7d2ec0e (diff) | |
download | git-6a01554e6350123c78de805d820e90f1c56e5fdc.tar.gz |
fix segfault showing an empty remote
In case of an empty list, the search for its tail caused a
NULL-pointer dereference.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Reported-by: Erik Faye-Lund <kusmabite@googlemail.com>
Acked-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-x | t/t5505-remote.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 5ec668d6d8..e70246b3fb 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -494,5 +494,15 @@ test_expect_success 'remote prune to cause a dangling symref' ' grep "dangling symref" err ' +test_expect_success 'show empty remote' ' + + test_create_repo empty && + git clone empty empty-clone && + ( + cd empty-clone && + git remote show origin + ) +' + test_done |