All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] BUG: git push on an empty clone segfaults.
@ 2009-04-20  9:48 Matthieu Moy
  2009-04-20 10:20 ` [PATCH] Fix uninitialized memory in get_local_heads() Johannes Schindelin
  2009-04-20 10:33 ` [PATCH] BUG: git push on an empty clone segfaults Junio C Hamano
  0 siblings, 2 replies; 11+ messages in thread
From: Matthieu Moy @ 2009-04-20  9:48 UTC (permalink / raw)
  To: gitster, git; +Cc: Matthieu Moy

Ideally, "git push" from an empty repository to another empty one
should be a no-op, or perhaps should error out cleanly. Currently, it
just segfaults.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 t/t5701-clone-local.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh
index 3559d17..7c6ef4c 100755
--- a/t/t5701-clone-local.sh
+++ b/t/t5701-clone-local.sh
@@ -132,4 +132,14 @@ test_expect_success 'clone empty repository' '
 	 test $actual = $expected)
 '
 
+test_expect_failure '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
-- 
1.6.2.2.449.g92961.dirty

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-04-20 20:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-20  9:48 [PATCH] BUG: git push on an empty clone segfaults Matthieu Moy
2009-04-20 10:20 ` [PATCH] Fix uninitialized memory in get_local_heads() Johannes Schindelin
2009-04-20 13:51   ` Jay Soffian
2009-04-20 10:33 ` [PATCH] BUG: git push on an empty clone segfaults Junio C Hamano
2009-04-20 10:55   ` Johannes Schindelin
2009-04-20 11:13     ` Junio C Hamano
2009-04-20 13:55     ` Petr Baudis
2009-04-20 14:30       ` Johannes Schindelin
2009-04-20 20:46         ` Petr Baudis
2009-04-20 11:07   ` Matthieu Moy
2009-04-20 11:09   ` [PATCH] clone: add test for push on an empty clone Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.