diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-08-05 22:15:09 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-15 19:57:41 -0700 |
commit | 3ba7e6e29afd67e69ff5963d8ed76728824959a0 (patch) | |
tree | 896e7b8b62d1ce6aed4b07be408fdc01e6d6223b /builtin | |
parent | bundle: run setup_git_directory_gently() sooner (diff) | |
download | tgif-3ba7e6e29afd67e69ff5963d8ed76728824959a0.tar.xz |
config: run setup_git_directory_gently() sooner
For the pager choice (and the choice to paginate) to reflect the
current repository configuration, the repository needs to be
located first.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/config.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/config.c b/builtin/config.c index f3d1660d02..3f8ef91dfc 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -330,11 +330,10 @@ static int get_colorbool(int print) return get_colorbool_found ? 0 : 1; } -int cmd_config(int argc, const char **argv, const char *unused_prefix) +int cmd_config(int argc, const char **argv, const char *prefix) { - int nongit; + int nongit = !startup_info->have_repository; char *value; - const char *prefix = setup_git_directory_gently(&nongit); config_exclusive_filename = getenv(CONFIG_ENVIRONMENT); |