From: Junio C Hamano Date: Sun, 10 Feb 2008 02:57:43 GMT Subject: Re: [PATCH] commit.c: guard config parser from value=NULL Message-ID: <7vir0x5xi0.fsf@gitster.siamese.dyndns.org> In-Reply-To: <5d46db230802091216h40f88f06r20ebb84de6717af6@mail.gmail.com> "Govind Salinas" writes: > - if (!strcmp(var, "user.name")) { > + if (value && !strcmp(var, "user.name")) { > strlcpy(git_default_name, value, sizeof(git_default_name)); > return 0; > } This is wrong, isn't it? When somebody says [user] name we should not silently ignore it, but instead say "user.name is not a bool!" and error out. The same comment applies to all other if (value && !strcmp(var, "")) conversions.