Re: [PATCH] Having keywords without value is not a global error.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 25 Feb 2010, Junio C Hamano wrote:
> Steven Drake <sdrake@xxxxxxxxxx> writes:
> 
> > It is not a good Idea to give a config_error for _any_ keyword without a
> > value as it means that
> >
> > 	[section]
> > 		keyword
> >
> > sytle can not be using for setting bool type keyword.
> >
> > Signed-off-by: Steven Drake <sdrake@xxxxxxxxxx>
> > ---
> >  builtin/init-db.c |    2 --
> >  1 files changed, 0 insertions(+), 2 deletions(-)
> >
> > diff --git a/builtin/init-db.c b/builtin/init-db.c
> > index 9273942..edc40ff 100644
> > --- a/builtin/init-db.c
> > +++ b/builtin/init-db.c
> > @@ -170,8 +170,6 @@ static void copy_templates(const char *template_dir)
> >  
> >  static int git_init_db_config(const char *k, const char *v, void *cb)
> >  {
> > -	if (!v)
> > -		return config_error_nonbool(k);
> >  	if (!strcmp(k, "init.templatedir"))
> >  		return git_config_pathname(&init_db_template_dir, k, v);
> 
> But then don't you need to catch init.templatedir does have a string
> value?

Yes, but the change dose not touch that test, it removes two lines that I
can't remember why a put there.

-- 
Steven
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]