]> git.ipfire.org Git - thirdparty/git.git/commit - config.c
git_config_with_options: drop "found" counting
authorJeff King <peff@peff.net>
Wed, 18 May 2016 22:39:02 +0000 (18:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 May 2016 20:21:58 +0000 (13:21 -0700)
commitc72ee44bf4bc7549ee8710037ae8adfae6d8efc2
tree395e9a9f988cf1f01abf73f88e9123677380acb4
parent3a0f269e7c82aa3a87323cb7ae04ac5f129f036b
git_config_with_options: drop "found" counting

Prior to 1f2baa7 (config: treat non-existent config files as
empty, 2010-10-21), we returned an error if any config files
were missing. That commit made this a non-error, but
returned the number of sources found, in case any caller
wanted to distinguish this case.

In the past 5+ years, no caller has; the only two places
which bother to check the return value care only about the
error case.  Let's drop this code, which complicates the
function. Similarly, let's drop the "found anything" return
from git_config_from_parameters, which was present only to
support this (and similarly has never had other callers care
for the past 5+ years).

Note that we do need to update a comment in one of the
callers, even though the code immediately below it doesn't
care about this case.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c