Re: [PATCH v2] log: Read gpg settings for signed commit verification
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 27, 2013, 17:02 UTC
- Message-ID
- <7vwqssn5c6.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130327162232.GB22386@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 26 quoted lines
> 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.
Yeah, that is where my conclusion in the message you are responding comes from ;-)