From: Frank Lichtenheld Date: Fri, 14 Mar 2008 17:29:27 +0000 (+0100) Subject: var: Don't require to be in a git repository. X-Git-Tag: v1.5.6-rc0~157^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2fba8366ed1e77685c83bbb0fa353c11624f0121;p=git.git var: Don't require to be in a git repository. git var works fine even when not called in a git repository. So don't require it. This will make it possible to remove this pre-condition for some other git commands as well. Signed-off-by: Frank Lichtenheld Signed-off-by: Junio C Hamano --- diff --git a/var.c b/var.c index 0de0efa2a..c20ac919b 100644 --- a/var.c +++ b/var.c @@ -51,11 +51,12 @@ static int show_config(const char *var, const char *value) int main(int argc, char **argv) { const char *val; + int nongit; if (argc != 2) { usage(var_usage); } - setup_git_directory(); + setup_git_directory_gently(&nongit); val = NULL; if (strcmp(argv[1], "-l") == 0) {