1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-20 22:46:27 +02:00

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>
This commit is contained in:
Frank Lichtenheld 2008-03-14 18:29:27 +01:00 committed by Junio C Hamano
parent 1658c6149a
commit 2fba8366ed

3
var.c
View File

@ -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) {