diff options
author | Russell Belfer <rb@github.com> | 2012-10-25 04:32:50 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-11-10 01:52:06 +0400 |
commit | 331e7de9004db5909edd1057db88f63a53dd2d3f (patch) | |
tree | 8919f7b5791a3cff372f0099870b842276f39b54 /src/reflog.c | |
parent | 8a328cf442237f65d58ad779d775c77a7c462df5 (diff) |
Extensions to rmdir and mkdir utilities
* Rework GIT_DIRREMOVAL values to GIT_RMDIR flags, allowing
combinations of flags
* Add GIT_RMDIR_EMPTY_PARENTS flag to remove parent dirs that
are left empty after removal
* Add GIT_MKDIR_VERIFY_DIR to give an error if item is a file,
not a dir (previously an EEXISTS error was ignored, even for
files) and enable this flag for git_futils_mkpath2file call
* Improve accuracy of error messages from git_futils_mkdir
Diffstat (limited to 'src/reflog.c')
-rw-r--r-- | src/reflog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflog.c b/src/reflog.c index 5d1465eca..0e333aa6f 100644 --- a/src/reflog.c +++ b/src/reflog.c @@ -378,7 +378,7 @@ int git_reflog_rename(git_reference *ref, const char *new_name) goto cleanup; if (git_path_isdir(git_buf_cstr(&new_path)) && - (git_futils_rmdir_r(git_buf_cstr(&new_path), NULL, GIT_DIRREMOVAL_ONLY_EMPTY_DIRS) < 0)) + (git_futils_rmdir_r(git_buf_cstr(&new_path), NULL, GIT_RMDIR_SKIP_NONEMPTY) < 0)) goto cleanup; if (git_futils_mkpath2file(git_buf_cstr(&new_path), GIT_REFLOG_DIR_MODE) < 0) |