File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -294,11 +294,12 @@ void test_checkout_index__options_dir_modes(void)
294
294
(void )p_umask (um = p_umask (022 ));
295
295
296
296
cl_git_pass (p_stat ("./testrepo/a" , & st ));
297
- cl_assert_equal_i_fmt (st .st_mode , (GIT_FILEMODE_TREE | 0701 ) & ~um , "%07o" );
297
+ /* 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" );
298
299
299
300
/* File-mode test, since we're on the 'dir' branch */
300
301
cl_git_pass (p_stat ("./testrepo/a/b.txt" , & st ));
301
- 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" );
302
303
303
304
git_commit_free (commit );
304
305
}
You can’t perform that action at this time.
0 commit comments