summaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-08-06 03:15:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-16 02:57:41 (GMT)
commit3ba7e6e29afd67e69ff5963d8ed76728824959a0 (patch)
tree896e7b8b62d1ce6aed4b07be408fdc01e6d6223b /builtin/config.c
parent2cb60093e6c6b53cfc8ffe75f697386a1adab778 (diff)
downloadgit-3ba7e6e29afd67e69ff5963d8ed76728824959a0.zip
git-3ba7e6e29afd67e69ff5963d8ed76728824959a0.tar.gz
git-3ba7e6e29afd67e69ff5963d8ed76728824959a0.tar.bz2
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/config.c')
-rw-r--r--builtin/config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/config.c b/builtin/config.c
index f3d1660..3f8ef91 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);