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 /tests-clar/submodule/status.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 'tests-clar/submodule/status.c')
-rw-r--r-- | tests-clar/submodule/status.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests-clar/submodule/status.c b/tests-clar/submodule/status.c index eec028c40..325013466 100644 --- a/tests-clar/submodule/status.c +++ b/tests-clar/submodule/status.c @@ -50,7 +50,7 @@ void test_submodule_status__ignore_none(void) git_buf path = GIT_BUF_INIT; cl_git_pass(git_buf_joinpath(&path, git_repository_workdir(g_repo), "sm_unchanged")); - cl_git_pass(git_futils_rmdir_r(git_buf_cstr(&path), NULL, GIT_DIRREMOVAL_FILES_AND_DIRS)); + cl_git_pass(git_futils_rmdir_r(git_buf_cstr(&path), NULL, GIT_RMDIR_REMOVE_FILES)); cl_git_fail(git_submodule_lookup(&sm, g_repo, "not_submodule")); @@ -135,7 +135,7 @@ void test_submodule_status__ignore_untracked(void) git_submodule_ignore_t ign = GIT_SUBMODULE_IGNORE_UNTRACKED; cl_git_pass(git_buf_joinpath(&path, git_repository_workdir(g_repo), "sm_unchanged")); - cl_git_pass(git_futils_rmdir_r(git_buf_cstr(&path), NULL, GIT_DIRREMOVAL_FILES_AND_DIRS)); + cl_git_pass(git_futils_rmdir_r(git_buf_cstr(&path), NULL, GIT_RMDIR_REMOVE_FILES)); cl_git_pass(git_submodule_foreach(g_repo, set_sm_ignore, &ign)); @@ -195,7 +195,7 @@ void test_submodule_status__ignore_dirty(void) git_submodule_ignore_t ign = GIT_SUBMODULE_IGNORE_DIRTY; cl_git_pass(git_buf_joinpath(&path, git_repository_workdir(g_repo), "sm_unchanged")); - cl_git_pass(git_futils_rmdir_r(git_buf_cstr(&path), NULL, GIT_DIRREMOVAL_FILES_AND_DIRS)); + cl_git_pass(git_futils_rmdir_r(git_buf_cstr(&path), NULL, GIT_RMDIR_REMOVE_FILES)); cl_git_pass(git_submodule_foreach(g_repo, set_sm_ignore, &ign)); @@ -255,7 +255,7 @@ void test_submodule_status__ignore_all(void) git_submodule_ignore_t ign = GIT_SUBMODULE_IGNORE_ALL; cl_git_pass(git_buf_joinpath(&path, git_repository_workdir(g_repo), "sm_unchanged")); - cl_git_pass(git_futils_rmdir_r(git_buf_cstr(&path), NULL, GIT_DIRREMOVAL_FILES_AND_DIRS)); + cl_git_pass(git_futils_rmdir_r(git_buf_cstr(&path), NULL, GIT_RMDIR_REMOVE_FILES)); cl_git_pass(git_submodule_foreach(g_repo, set_sm_ignore, &ign)); |