summaryrefslogtreecommitdiff
path: root/var.c
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2008-03-14 18:29:27 +0100
committerJunio C Hamano <gitster@pobox.com>2008-03-15 01:43:56 -0700
commit2fba8366ed1e77685c83bbb0fa353c11624f0121 (patch)
tree0845e279cf6f89585e7d8cb477c4b1236051bdf2 /var.c
parent1658c6149ac4462c874810c760507040122917e8 (diff)
downloadgit-2fba8366ed1e77685c83bbb0fa353c11624f0121.tar.gz
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 <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'var.c')
-rw-r--r--var.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/var.c b/var.c
index 0de0efa2aa..c20ac919bd 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) {