Always show which directory is not a git repository

Unify all

  fatal: Not a git repository

error messages so they include path information.

Signed-off-by: Richard Hartmann <richih@net.in.tum.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Richard Hartmann
2008-12-22 00:17:32 +01:00
committed by Junio C Hamano
parent 5fdb709835
commit f66bc5f928
3 changed files with 4 additions and 4 deletions

View File

@ -468,7 +468,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
*nongit_ok = 1;
return NULL;
}
die("Not a git repository");
die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT);
}
if (chdir(".."))
die("Cannot change to %s/..: %s", cwd, strerror(errno));