author | Jeff King <peff@peff.net> | |
Tue, 24 May 2011 22:49:55 +0000 (18:49 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 24 May 2011 23:25:36 +0000 (16:25 -0700) | ||
commit | 06eb708f331f0829081f4f3fb3c465eaae345deb | |
tree | 358ed944c194958c7e45dc7ceca4911c6ff6e563 | tree | snapshot |
parent | 5a0c9eeb89a19a05cbc2bf570f69f1724ef873dd | commit | diff |
config: always parse GIT_CONFIG_PARAMETERS during git_config
Previously we parsed GIT_CONFIG_PARAMETERS lazily into a
linked list, and then checked that list during future
invocations of git_config. However, that ignores the fact
that the environment variable could change during our run
(e.g., because we parse more "-c" as part of an alias).
Instead, let's just re-parse the environment variable each
time. It's generally not very big, and it's no more work
than parsing the config files, anyway.
As a bonus, we can ditch all of the linked list storage code
entirely, making the code much simpler.
The test unfortunately still does not pass because of an
unrelated bug in handle_options.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previously we parsed GIT_CONFIG_PARAMETERS lazily into a
linked list, and then checked that list during future
invocations of git_config. However, that ignores the fact
that the environment variable could change during our run
(e.g., because we parse more "-c" as part of an alias).
Instead, let's just re-parse the environment variable each
time. It's generally not very big, and it's no more work
than parsing the config files, anyway.
As a bonus, we can ditch all of the linked list storage code
entirely, making the code much simpler.
The test unfortunately still does not pass because of an
unrelated bug in handle_options.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c | diff | blob | history | |
t/t1300-repo-config.sh | diff | blob | history |