mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 20:29:27 +00:00
reflog: create reflog and its directory structure
This commit is contained in:
parent
d2aa6de722
commit
27e3c58392
@ -188,7 +188,10 @@ static int retrieve_reflog_path(git_buf *path, git_reference *ref)
|
|||||||
|
|
||||||
static int create_new_reflog_file(const char *filepath)
|
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,
|
if ((fd = p_open(filepath,
|
||||||
O_WRONLY | O_CREAT | O_TRUNC,
|
O_WRONLY | O_CREAT | O_TRUNC,
|
||||||
|
Loading…
Reference in New Issue
Block a user