author | Jeff King <peff@peff.net> | |
Thu, 16 Feb 2012 08:04:05 +0000 (03:04 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 17 Feb 2012 15:52:41 +0000 (07:52 -0800) | ||
commit | 0a5f57592728e7667d9e60e309f6270db9fdb67b | |
tree | 7d857ff695fae308375d680af8f3356ba299a65c | tree | snapshot |
parent | 839de2527258879aa21ae7ad425353f06dbb4717 | commit | diff |
config: teach git_config_set_multivar_in_file a default path
The git_config_set_multivar_in_file function takes a
filename argument to specify the file into which the values
should be written. Currently, this value must be non-NULL.
Callers which want to write to the default location must use
the regular, non-"in_file" version, which will either write
to config_exclusive_filename, or to the repo config if the
exclusive filename is NULL.
Let's migrate the "default to using repo config" logic into
the "in_file" form. That will let callers get the same
default-if-NULL behavior as one gets with
config_exclusive_filename, but without having to use the
global variable.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The git_config_set_multivar_in_file function takes a
filename argument to specify the file into which the values
should be written. Currently, this value must be non-NULL.
Callers which want to write to the default location must use
the regular, non-"in_file" version, which will either write
to config_exclusive_filename, or to the repo config if the
exclusive filename is NULL.
Let's migrate the "default to using repo config" logic into
the "in_file" form. That will let callers get the same
default-if-NULL behavior as one gets with
config_exclusive_filename, but without having to use the
global variable.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c | diff | blob | history |