@matheusbsbs / matheus-bagliano / commits / e0a87193d3
Fork 0

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>

Junio C Hamano committed Nov 20, 2005 at 23:37 UTC e0a87193d3f2b78b7b687405c0315e1517d36912
1 file changed +1 -1
path.c
+1 -1
@@ -181,7 +181,7 @@ char *enter_repo(char *path, int strict)
181 return NULL;
182
183 if (strict) {
184 - if((path[0] != '/') || chdir(path) < 0)
184 + if (chdir(path) < 0)
185 return NULL;
186 }
187 else {