Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c756448 commit 407f2e9Copy full SHA for 407f2e9
tests/checkout/index.c
@@ -294,11 +294,12 @@ void test_checkout_index__options_dir_modes(void)
294
(void)p_umask(um = p_umask(022));
295
296
cl_git_pass(p_stat("./testrepo/a", &st));
297
- cl_assert_equal_i_fmt(st.st_mode, (GIT_FILEMODE_TREE | 0701) & ~um, "%07o");
+ /* Haiku & Hurd use other mode bits, so we must mask them out */
298
+ cl_assert_equal_i_fmt(st.st_mode & (S_IFMT | 07777), (GIT_FILEMODE_TREE | 0701) & ~um, "%07o");
299
300
/* File-mode test, since we're on the 'dir' branch */
301
cl_git_pass(p_stat("./testrepo/a/b.txt", &st));
- cl_assert_equal_i_fmt(st.st_mode, GIT_FILEMODE_BLOB_EXECUTABLE & ~um, "%07o");
302
+ cl_assert_equal_i_fmt(st.st_mode & (S_IFMT | 07777), GIT_FILEMODE_BLOB_EXECUTABLE & ~um, "%07o");
303
304
git_commit_free(commit);
305
}
0 commit comments