Re: [PATCH v2] log: Read gpg settings for signed commit verification

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

 



On Wed, Mar 27, 2013 at 09:15:58AM -0700, Junio C Hamano wrote:

> >  	}
> > -
> > +	if (git_gpg_config(var, value, cb) < 0)
> > +		return -1;
> >  	if (grep_config(var, value, cb) < 0)
> >  		return -1;
> 
> Hmph.  I do not particularly like the way the call to grep_config()
> loses information by not ignoring its return value and always
> returning -1, but I'll let it pass for this patch.

That's my fault for suggesting he follow the same style as grep here.
But I wonder if it is worth the effort. We have never cared about
anything beyond "was there an error" in our config callbacks, and the
value returned from the callbacks is lost in git_parse_file (i.e., we do
not propagate the actual return value, but only check that
"callback(var, value, data) < 0", and die if so).

Existing callbacks pass data out by writing into a struct pointed to by
the data pointer, which is more flexible, anyway.

So unless you want to overhaul the whole config system to propagate
return codes back to the caller, I do not think there is any point in
worrying about it.

-Peff
--
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]