From 27e3c58392a53a66a4b914d570a0af87a3a58c68 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Wed, 3 Oct 2012 15:12:42 +0200 Subject: [PATCH] reflog: create reflog and its directory structure --- src/reflog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/reflog.c b/src/reflog.c index 3c780cd1e..17cd6d93f 100644 --- a/src/reflog.c +++ b/src/reflog.c @@ -188,7 +188,10 @@ static int retrieve_reflog_path(git_buf *path, git_reference *ref) static int create_new_reflog_file(const char *filepath) { - int fd; + int fd, error; + + if ((error = git_futils_mkpath2file(filepath, GIT_REFLOG_DIR_MODE)) < 0) + return error; if ((fd = p_open(filepath, O_WRONLY | O_CREAT | O_TRUNC,