Subject: Re: What's cooking in git.git (Mar 2009, #03; Wed, 11)

From: René Scharfe <[email-masked]>
Date: Thu, 12 Mar 2009 21:22:50 +0100

Junio C Hamano schrieb:
> Tonight's 'pu' does not pass its self-test and it is expected; I won't be
> fixing it and I'm going to bed now.

This fixes a segfault:

diff --git a/remote.c b/remote.c
index 68c1a84..ea1841e 100644
--- a/remote.c
+++ b/remote.c
@@ -655,9 +655,9 @@ struct remote *remote_get(const char *name)
 	struct remote *ret;
 	int name_given = 0;
 
 	read_config();
-	if (name || strcmp(name, "-"))
+	if (name && strcmp(name, "-"))
 		name_given = 1;
 	else {
 		name = default_remote_name;
 		name_given = explicit_default_remote_name;