Fix "do not DWIM" patch to enter_repo"

We wanted --strict to mean "do not DWIM", but the code required to
see absolute path.  daemon does its own path verification and chdirs
to the verified repository, so enter_repo() called from upload-pack
will always enter ".".  Requiring absolute path does not make any sense.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2005-11-20 23:37:13 -08:00
parent 936a23420c
commit e0a87193d3

2
path.c
View File

@ -181,7 +181,7 @@ char *enter_repo(char *path, int strict)
return NULL;
if (strict) {
if((path[0] != '/') || chdir(path) < 0)
if (chdir(path) < 0)
return NULL;
}
else {