Re: [PATCH v2] log: Read gpg settings for signed commit verification
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:32
Jeff King [off-list ref] writes:
On Wed, Mar 27, 2013 at 09:15:58AM -0700, Junio C Hamano wrote:quoted
quoted
} - + 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 ;-)