git/builtin
Jeff King 270a34438b config: stop using config_exclusive_filename
The git-config command sometimes operates on the default set
of config files (either reading from all, or writing to repo
config), and sometimes operates on a specific file. In the
latter case, we set the magic global config_exclusive_filename,
and the code in config.c does the right thing.

Instead, let's have git-config use the "advanced" variants
of config.c's functions which let it specify an individual
filename (or NULL for the default). This makes the code a
lot more obvious, and fixes two small bugs:

  1. A relative path specified by GIT_CONFIG=foo will look
     in the wrong directory if we have to chdir as part of
     repository setup. We already handle this properly for
     "git config -f foo", but the GIT_CONFIG lookup used
     config_exclusive_filename directly. By dropping to a
     single magic variable, the GIT_CONFIG case now just
     works.

  2. Calling "git config -f foo --edit" would not respect
     core.editor. This is because just before editing, we
     called git_config, which would respect the
     config_exclusive_filename setting, even though this
     particular git_config call was not about looking in the
     user's specified file, but rather about loading actual
     git config, just as any other git program would.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-02-17 07:58:54 -08:00
..
2011-12-13 21:58:51 -08:00
2011-06-20 14:27:36 -07:00
2012-01-06 12:44:07 -08:00
2012-01-06 12:44:07 -08:00
2011-12-13 10:17:50 -08:00
2011-11-07 22:12:19 -08:00
2011-12-21 12:02:44 -08:00
2010-11-24 15:55:19 -08:00
2011-03-22 10:16:54 -07:00
2011-03-22 10:16:54 -07:00
2012-01-06 12:44:07 -08:00
2011-12-28 11:32:36 -08:00
2011-12-22 11:27:26 -08:00
2012-01-12 23:33:39 -08:00
2011-03-22 10:16:54 -07:00
2011-03-22 10:16:54 -07:00
2011-11-07 22:12:19 -08:00
2011-03-22 11:43:27 -07:00
2011-03-22 10:16:54 -07:00
2011-09-01 15:46:13 -07:00
2011-12-22 15:30:22 -08:00
2011-03-09 23:52:56 -08:00
2011-05-31 12:19:11 -07:00
2011-12-13 23:07:47 -08:00
2011-03-22 10:16:54 -07:00
2011-08-25 14:42:11 -07:00
2010-11-15 10:04:43 -08:00
2011-03-22 10:16:54 -07:00