summaryrefslogtreecommitdiff
path: root/receive-pack.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-08 16:22:22 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-08 16:22:22 -0700
commit113b94751d7f10617e22de0d017033a52b224c68 (patch)
treedf72183f1ad2b747764051f7924d4bda9c170534 /receive-pack.c
parent26c8a533afac9540e46e7d7707d9179772c6d2c8 (diff)
downloadgit-113b94751d7f10617e22de0d017033a52b224c68.tar.gz
Make "upload-pack" match git-fetch-pack usage
Do the default "try xyz.git xyz fails" thing for the directory we get passed in.
Diffstat (limited to 'receive-pack.c')
-rw-r--r--receive-pack.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/receive-pack.c b/receive-pack.c
index 1768c87531..f39703f7af 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -197,9 +197,7 @@ int main(int argc, char **argv)
/* chdir to the directory. If that fails, try appending ".git" */
if (chdir(dir) < 0) {
- static char path[PATH_MAX];
- snprintf(path, sizeof(path), "%s.git", dir);
- if (chdir(path) < 0)
+ if (chdir(mkpath("%s.git", dir)) < 0)
die("unable to cd to %s", dir);
}