@@ -579,7 +579,9 @@ static int fsck_tree(const struct object_id *tree_oid,
579
579
struct name_stack df_dup_candidates = { NULL };
580
580
581
581
if (init_tree_desc_gently (& desc , buffer , size )) {
582
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_BAD_TREE , "cannot be parsed as a tree" );
582
+ retval += report (options , tree_oid , OBJ_TREE ,
583
+ FSCK_MSG_BAD_TREE ,
584
+ "cannot be parsed as a tree" );
583
585
return retval ;
584
586
}
585
587
@@ -630,7 +632,9 @@ static int fsck_tree(const struct object_id *tree_oid,
630
632
}
631
633
632
634
if (update_tree_entry_gently (& desc )) {
633
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_BAD_TREE , "cannot be parsed as a tree" );
635
+ retval += report (options , tree_oid , OBJ_TREE ,
636
+ FSCK_MSG_BAD_TREE ,
637
+ "cannot be parsed as a tree" );
634
638
break ;
635
639
}
636
640
@@ -678,25 +682,45 @@ static int fsck_tree(const struct object_id *tree_oid,
678
682
name_stack_clear (& df_dup_candidates );
679
683
680
684
if (has_null_sha1 )
681
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_NULL_SHA1 , "contains entries pointing to null sha1" );
685
+ retval += report (options , tree_oid , OBJ_TREE ,
686
+ FSCK_MSG_NULL_SHA1 ,
687
+ "contains entries pointing to null sha1" );
682
688
if (has_full_path )
683
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_FULL_PATHNAME , "contains full pathnames" );
689
+ retval += report (options , tree_oid , OBJ_TREE ,
690
+ FSCK_MSG_FULL_PATHNAME ,
691
+ "contains full pathnames" );
684
692
if (has_empty_name )
685
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_EMPTY_NAME , "contains empty pathname" );
693
+ retval += report (options , tree_oid , OBJ_TREE ,
694
+ FSCK_MSG_EMPTY_NAME ,
695
+ "contains empty pathname" );
686
696
if (has_dot )
687
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_HAS_DOT , "contains '.'" );
697
+ retval += report (options , tree_oid , OBJ_TREE ,
698
+ FSCK_MSG_HAS_DOT ,
699
+ "contains '.'" );
688
700
if (has_dotdot )
689
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_HAS_DOTDOT , "contains '..'" );
701
+ retval += report (options , tree_oid , OBJ_TREE ,
702
+ FSCK_MSG_HAS_DOTDOT ,
703
+ "contains '..'" );
690
704
if (has_dotgit )
691
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_HAS_DOTGIT , "contains '.git'" );
705
+ retval += report (options , tree_oid , OBJ_TREE ,
706
+ FSCK_MSG_HAS_DOTGIT ,
707
+ "contains '.git'" );
692
708
if (has_zero_pad )
693
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_ZERO_PADDED_FILEMODE , "contains zero-padded file modes" );
709
+ retval += report (options , tree_oid , OBJ_TREE ,
710
+ FSCK_MSG_ZERO_PADDED_FILEMODE ,
711
+ "contains zero-padded file modes" );
694
712
if (has_bad_modes )
695
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_BAD_FILEMODE , "contains bad file modes" );
713
+ retval += report (options , tree_oid , OBJ_TREE ,
714
+ FSCK_MSG_BAD_FILEMODE ,
715
+ "contains bad file modes" );
696
716
if (has_dup_entries )
697
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_DUPLICATE_ENTRIES , "contains duplicate file entries" );
717
+ retval += report (options , tree_oid , OBJ_TREE ,
718
+ FSCK_MSG_DUPLICATE_ENTRIES ,
719
+ "contains duplicate file entries" );
698
720
if (not_properly_sorted )
699
- retval += report (options , tree_oid , OBJ_TREE , FSCK_MSG_TREE_NOT_SORTED , "not properly sorted" );
721
+ retval += report (options , tree_oid , OBJ_TREE ,
722
+ FSCK_MSG_TREE_NOT_SORTED ,
723
+ "not properly sorted" );
700
724
return retval ;
701
725
}
702
726
0 commit comments