summaryrefslogtreecommitdiff
path: root/checkout-cache.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2005-05-05 23:34:10 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 23:51:46 (GMT)
commitd5f415e6f5c1f3930a4651c2804cd4e2205a79de (patch)
tree73e4e31bece1d023ad57580c2dde010410ee97c0 /checkout-cache.c
parent42ea9cb286423c949d42ad33823a5221182f84bf (diff)
downloadgit-d5f415e6f5c1f3930a4651c2804cd4e2205a79de.zip
git-d5f415e6f5c1f3930a4651c2804cd4e2205a79de.tar.gz
git-d5f415e6f5c1f3930a4651c2804cd4e2205a79de.tar.bz2
[PATCH] create subdirs for symlinks
We may need to create subdirectories, before we can create a symlink. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'checkout-cache.c')
-rw-r--r--checkout-cache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/checkout-cache.c b/checkout-cache.c
index 367b9c7..244ebd1 100644
--- a/checkout-cache.c
+++ b/checkout-cache.c
@@ -96,6 +96,7 @@ static int write_entry(struct cache_entry *ce, const char *path)
case S_IFLNK:
memcpy(target, new, size);
target[size] = '\0';
+ create_directories(path);
if (symlink(target, path)) {
free(new);
return error("checkout-cache: unable to create symlink %s (%s)",