summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-07-27 11:50:32 -0700
committerBen Straub <bstraub@github.com>2012-07-27 11:50:32 -0700
commitb494cdbdb2833d1233291eea7eb5d9290257131e (patch)
tree1e28db239a527cbfda663db9f66baaf4fb0e0265
parent8a155a044b2251f53e6c0524c4a4eeaac53dc31f (diff)
downloadlibgit2-b494cdbdb2833d1233291eea7eb5d9290257131e.tar.gz
Checkout: handle deeply-nested submodules better.
Now creating intermediate directories where the submodule is deep, like "src/deps/foosubmodule".
-rw-r--r--src/checkout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/checkout.c b/src/checkout.c
index 052054701..24d2149c8 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -120,7 +120,8 @@ static int checkout_walker(const char *path, const git_tree_entry *entry, void *
case GIT_OBJ_COMMIT:
/* Submodule */
- retcode = p_mkdir(git_buf_cstr(&fnbuf), 0644);
+ git_futils_mkpath2file(git_buf_cstr(&fnbuf), data->opts->dir_mode);
+ retcode = p_mkdir(git_buf_cstr(&fnbuf), data->opts->dir_mode);
break;
case GIT_OBJ_BLOB: