@@ -637,13 +637,14 @@ void test_iterator_workdir__filesystem2(void)
637637 git_iterator_free (i );
638638}
639639
640- /* Lots of empty dirs, or nearly empty ones, make the old workdir
641- * iterator cry. Also, segfault.
640+ /*
641+ * Lots of empty dirs, or nearly empty ones, make the old workdir
642+ * iterator cry. Also, segfault.
642643 */
643644void test_iterator_workdir__filesystem_gunk (void )
644645{
645- git_iterator * i ;
646646 git_buf parent = GIT_BUF_INIT ;
647+ git_iterator * i ;
647648 int n ;
648649
649650 if (!cl_is_env_set ("GITTEST_INVASIVE_SPEED" ))
@@ -653,19 +654,18 @@ void test_iterator_workdir__filesystem_gunk(void)
653654
654655 for (n = 0 ; n < 100000 ; n ++ ) {
655656 git_buf_clear (& parent );
656- git_buf_printf (& parent , "%s/refs/heads/foo/%d/subdir" ,
657- git_repository_path (g_repo ), n );
658- cl_assert (!git_buf_oom (& parent ));
659-
657+ cl_git_pass (git_buf_printf (& parent , "%s/refs/heads/foo/%d/subdir" , git_repository_path (g_repo ), n ));
660658 cl_git_pass (git_futils_mkdir (parent .ptr , 0775 , GIT_MKDIR_PATH ));
661659 }
662660
663661 cl_git_pass (git_iterator_for_filesystem (& i , "testrepo/.git/refs" , NULL ));
664662
665- /* should only have 16 items, since we're not asking for trees to be
663+ /*
664+ * Should only have 17 items, since we're not asking for trees to be
666665 * returned. the goal of this test is simply to not crash.
667666 */
668- expect_iterator_items (i , 16 , NULL , 15 , NULL );
667+ expect_iterator_items (i , 17 , NULL , 16 , NULL );
668+
669669 git_iterator_free (i );
670670 git_buf_dispose (& parent );
671671}
0 commit comments