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)
294294 (void )p_umask (um = p_umask (022 ));
295295
296296 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" );
298299
299300 /* File-mode test, since we're on the 'dir' branch */
300301 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" );
302303
303304 git_commit_free (commit );
304305}
You can’t perform that action at this time.
0 commit comments