summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f0ef6a6)
raw | patch | inline | side by side (parent: f0ef6a6)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Fri, 6 Aug 2010 03:21:40 +0000 (22:21 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 16 Aug 2010 03:00:02 +0000 (20:00 -0700) |
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>
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>
builtin/var.c | patch | blob | history | |
git.c | patch | blob | history |
diff --git a/builtin/var.c b/builtin/var.c
index 70fdb4dec7e8b0c56ded90ee7f086cc9f16293a1..0744bb83185289e26bd32b3b2ecaec717d8c75d7 100644 (file)
--- a/builtin/var.c
+++ b/builtin/var.c
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);
index 86b0a88d97a5bddf81916c4abc2cb8975edcd52f..89bce659179e6633bb88f9a010985d7ce34668a9 100644 (file)
--- a/git.c
+++ b/git.c
{ "update-ref", cmd_update_ref, RUN_SETUP },
{ "update-server-info", cmd_update_server_info, RUN_SETUP },
{ "upload-archive", cmd_upload_archive },
- { "var", cmd_var },
+ { "var", cmd_var, RUN_SETUP_GENTLY },
{ "verify-tag", cmd_verify_tag, RUN_SETUP },
{ "version", cmd_version },
{ "whatchanged", cmd_whatchanged, RUN_SETUP | USE_PAGER },