@matheusbsbs / matheus-bagliano / commits / 2fba8366ed
Fork 0

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>

Frank Lichtenheld committed Mar 14, 2008 at 18:29 UTC 2fba8366ed1e77685c83bbb0fa353c11624f0121
1 file changed +2 -1
var.c
+2 -1
@@ -51,11 +51,12 @@ static int show_config(const char *var, const char *value)
51 int main(int argc, char **argv)
52 {
53 const char *val;
54 + int nongit;
55 if (argc != 2) {
56 usage(var_usage);
57 }
58
58 - setup_git_directory();
59 + setup_git_directory_gently(&nongit);
60 val = NULL;
61
62 if (strcmp(argv[1], "-l") == 0) {