diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-08-05 22:21:40 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-15 20:00:02 -0700 |
commit | 2bc8c1a8a6b1cdffc19badc7272f552302b79d3e (patch) | |
tree | 416338ec638a4e2c6254d618f4426a131a6ed797 /builtin/var.c | |
parent | f0ef6a6eff15a3df8dc9ec61d93e3f7e540ed0ac (diff) | |
download | git-2bc8c1a8a6b1cdffc19badc7272f552302b79d3e.tar.gz |
var: run setup_git_directory_gently() sooner
Part of a campaign to make repository-local configuration
available early (simplifying the startup sequence for
built-in commands).
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/var.c')
-rw-r--r-- | builtin/var.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/builtin/var.c b/builtin/var.c index 70fdb4dec7..0744bb8318 100644 --- a/builtin/var.c +++ b/builtin/var.c @@ -74,14 +74,9 @@ static int show_config(const char *var, const char *value, void *cb) int cmd_var(int argc, const char **argv, const char *prefix) { - const char *val; - int nongit; - if (argc != 2) { + const char *val = NULL; + if (argc != 2) usage(var_usage); - } - - setup_git_directory_gently(&nongit); - val = NULL; if (strcmp(argv[1], "-l") == 0) { git_config(show_config, NULL); |