summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a67c1d0)
raw | patch | inline | side by side (parent: a67c1d0)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 29 Oct 2005 20:02:18 +0000 (13:02 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 29 Oct 2005 20:02:18 +0000 (13:02 -0700) |
The latest init-db does not create .git/objects/??/ directories
anymore and expects the users of the repository to create them
as they are needed. local-fetch was not taught about it, which
broke local cloning with Cogito.
Signed-off-by: Junio C Hamano <junkio@cox.net>
anymore and expects the users of the repository to create them
as they are needed. local-fetch was not taught about it, which
broke local cloning with Cogito.
Signed-off-by: Junio C Hamano <junkio@cox.net>
local-fetch.c | patch | blob | history |
diff --git a/local-fetch.c b/local-fetch.c
index 87a93de02f759f544ebfd1d6fb584886f483fbfc..0a071144b584a419270d0bc8bf34273b85962de0 100644 (file)
--- a/local-fetch.c
+++ b/local-fetch.c
return 0;
}
-static int copy_file(const char *source, const char *dest, const char *hex,
+static int copy_file(const char *source, char *dest, const char *hex,
int warn_if_not_exists)
{
+ safe_create_leading_directories(dest);
if (use_link) {
if (!link(source, dest)) {
pull_say("link %s\n", hex);
static int object_name_start = -1;
static char filename[PATH_MAX];
char *hex = sha1_to_hex(sha1);
- const char *dest_filename = sha1_file_name(sha1);
+ char *dest_filename = sha1_file_name(sha1);
if (object_name_start < 0) {
strcpy(filename, path); /* e.g. git.git */