From: Junio C Hamano Date: Mon, 21 Nov 2005 07:37:13 +0000 (-0800) Subject: Fix "do not DWIM" patch to enter_repo" X-Git-Tag: v0.99.9k^2~42 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e0a87193d3f2b78b7b687405c0315e1517d36912;p=git.git 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 --- diff --git a/path.c b/path.c index 84b3272d..4d889473 100644 --- a/path.c +++ b/path.c @@ -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 {