From: Junio C Hamano Date: Thu, 12 Mar 2009 20:43:52 GMT Subject: Re: What's cooking in git.git (Mar 2009, #03; Wed, 11) Message-ID: <7viqmejwtz.fsf@gitster.siamese.dyndns.org> In-Reply-To: <49B96F1A.3060001@lsrfire.ath.cx> René Scharfe writes: > 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: Oops, you're right. > 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;