summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-21 07:37:13 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-21 07:37:13 (GMT)
commite0a87193d3f2b78b7b687405c0315e1517d36912 (patch)
treeed1a1529799a29db7344321594000fbc93196c8a
parent936a23420c8e1630e013578ba9285cd69cf918f7 (diff)
downloadgit-e0a87193d3f2b78b7b687405c0315e1517d36912.zip
git-e0a87193d3f2b78b7b687405c0315e1517d36912.tar.gz
git-e0a87193d3f2b78b7b687405c0315e1517d36912.tar.bz2
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>
-rw-r--r--path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/path.c b/path.c
index 84b3272..4d88947 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 {