diff options
author | Ben Straub <bs@github.com> | 2013-10-28 22:04:58 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-10-28 22:04:58 +0400 |
commit | 42c8f8f807fe986534e0cbabbfabc32cb4eb9077 (patch) | |
tree | fa76cb66e6d49855be344026b1cbe31d03962916 /tests-clar/checkout/index.c | |
parent | a7d28f40a2a01382b76c55ca0a0672c177adaf69 (diff) | |
parent | 5c50f22a93c78190fb7d81802199ff9defc8cf55 (diff) |
Merge remote-tracking branch 'libgit2/development' into blame
Diffstat (limited to 'tests-clar/checkout/index.c')
-rw-r--r-- | tests-clar/checkout/index.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests-clar/checkout/index.c b/tests-clar/checkout/index.c index 73050d08e..48d6d79f9 100644 --- a/tests-clar/checkout/index.c +++ b/tests-clar/checkout/index.c @@ -224,13 +224,15 @@ void test_checkout_index__options_disable_filters(void) void test_checkout_index__options_dir_modes(void) { -#ifndef GIT_WIN32 git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; struct stat st; git_oid oid; git_commit *commit; mode_t um; + if (!cl_is_chmod_supported()) + return; + cl_git_pass(git_reference_name_to_id(&oid, g_repo, "refs/heads/dir")); cl_git_pass(git_commit_lookup(&commit, g_repo, &oid)); @@ -252,15 +254,16 @@ void test_checkout_index__options_dir_modes(void) cl_assert_equal_i_fmt(st.st_mode, GIT_FILEMODE_BLOB_EXECUTABLE, "%07o"); git_commit_free(commit); -#endif } void test_checkout_index__options_override_file_modes(void) { -#ifndef GIT_WIN32 git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT; struct stat st; + if (!cl_is_chmod_supported()) + return; + opts.checkout_strategy = GIT_CHECKOUT_SAFE_CREATE; opts.file_mode = 0700; @@ -268,7 +271,6 @@ void test_checkout_index__options_override_file_modes(void) cl_git_pass(p_stat("./testrepo/new.txt", &st)); cl_assert_equal_i_fmt(st.st_mode & GIT_MODE_PERMS_MASK, 0700, "%07o"); -#endif } void test_checkout_index__options_open_flags(void) |