diff options
author | Edward Thomson <ethomson@microsoft.com> | 2015-09-16 22:07:27 +0300 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-09-17 17:00:35 +0300 |
commit | ac2fba0ecd68e8eae348dec688cbcd0828432cdf (patch) | |
tree | 35921227c4eae6e36a65a90e391966319d9676b2 /tests/submodule | |
parent | add0378d8eb76cb7fde92bcbed3eb59ee5b8947c (diff) |
git_futils_mkdir_*: make a relative-to-base mkdir
Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
assumes that we own everything beneath the base, as if it were
being called with a base of the repository or working directory,
and is tailored towards checkout and ensuring that there is no
bogosity beneath the base that must be cleaned up.
This is (at best) slow and (at worst) unsafe in the larger context
of a filesystem where we do not own things and cannot do things like
unlink symlinks that are in our way.
Diffstat (limited to 'tests/submodule')
-rw-r--r-- | tests/submodule/status.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/submodule/status.c b/tests/submodule/status.c index 5f4e62053..10f385ce9 100644 --- a/tests/submodule/status.c +++ b/tests/submodule/status.c @@ -92,7 +92,7 @@ void test_submodule_status__ignore_none(void) cl_assert((status & GIT_SUBMODULE_STATUS_WD_DELETED) != 0); /* now mkdir sm_unchanged to test uninitialized */ - cl_git_pass(git_futils_mkdir("sm_unchanged", "submod2", 0755, 0)); + cl_git_pass(git_futils_mkdir_relative("sm_unchanged", "submod2", 0755, 0, NULL)); status = get_submodule_status(g_repo, "sm_unchanged"); cl_assert((status & GIT_SUBMODULE_STATUS_WD_UNINITIALIZED) != 0); @@ -141,7 +141,7 @@ void test_submodule_status__ignore_untracked(void) cl_assert((status & GIT_SUBMODULE_STATUS_WD_DELETED) != 0); /* now mkdir sm_unchanged to test uninitialized */ - cl_git_pass(git_futils_mkdir("sm_unchanged", "submod2", 0755, 0)); + cl_git_pass(git_futils_mkdir_relative("sm_unchanged", "submod2", 0755, 0, NULL)); cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign)); cl_assert((status & GIT_SUBMODULE_STATUS_WD_UNINITIALIZED) != 0); @@ -185,7 +185,7 @@ void test_submodule_status__ignore_dirty(void) cl_assert((status & GIT_SUBMODULE_STATUS_WD_DELETED) != 0); /* now mkdir sm_unchanged to test uninitialized */ - cl_git_pass(git_futils_mkdir("sm_unchanged", "submod2", 0755, 0)); + cl_git_pass(git_futils_mkdir_relative("sm_unchanged", "submod2", 0755, 0, NULL)); cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign)); cl_assert((status & GIT_SUBMODULE_STATUS_WD_UNINITIALIZED) != 0); @@ -229,7 +229,7 @@ void test_submodule_status__ignore_all(void) cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status)); /* now mkdir sm_unchanged to test uninitialized */ - cl_git_pass(git_futils_mkdir("sm_unchanged", "submod2", 0755, 0)); + cl_git_pass(git_futils_mkdir_relative("sm_unchanged", "submod2", 0755, 0, NULL)); cl_git_pass(git_submodule_status(&status, g_repo,"sm_unchanged", ign)); cl_assert(GIT_SUBMODULE_STATUS_IS_UNMODIFIED(status)); @@ -338,7 +338,7 @@ void test_submodule_status__untracked_dirs_containing_ignored_files(void) "submod2/.git/modules/sm_unchanged/info/exclude", "\n*.ignored\n"); cl_git_pass( - git_futils_mkdir("sm_unchanged/directory", "submod2", 0755, 0)); + git_futils_mkdir_relative("sm_unchanged/directory", "submod2", 0755, 0, NULL)); cl_git_mkfile( "submod2/sm_unchanged/directory/i_am.ignored", "ignore this file, please\n"); |