@@ -686,63 +686,6 @@ extern int verify_ce_order;
686
686
687
687
extern int quote_path_fully ;
688
688
689
- /*
690
- * These values are used to help identify parts of a repository to fsync.
691
- * FSYNC_COMPONENT_NONE identifies data that will not be a persistent part of the
692
- * repository and so shouldn't be fsynced.
693
- */
694
- enum fsync_component {
695
- FSYNC_COMPONENT_NONE ,
696
- FSYNC_COMPONENT_LOOSE_OBJECT = 1 << 0 ,
697
- FSYNC_COMPONENT_PACK = 1 << 1 ,
698
- FSYNC_COMPONENT_PACK_METADATA = 1 << 2 ,
699
- FSYNC_COMPONENT_COMMIT_GRAPH = 1 << 3 ,
700
- FSYNC_COMPONENT_INDEX = 1 << 4 ,
701
- FSYNC_COMPONENT_REFERENCE = 1 << 5 ,
702
- };
703
-
704
- #define FSYNC_COMPONENTS_OBJECTS (FSYNC_COMPONENT_LOOSE_OBJECT | \
705
- FSYNC_COMPONENT_PACK)
706
-
707
- #define FSYNC_COMPONENTS_DERIVED_METADATA (FSYNC_COMPONENT_PACK_METADATA | \
708
- FSYNC_COMPONENT_COMMIT_GRAPH)
709
-
710
- #define FSYNC_COMPONENTS_DEFAULT ((FSYNC_COMPONENTS_OBJECTS | \
711
- FSYNC_COMPONENTS_DERIVED_METADATA) & \
712
- ~FSYNC_COMPONENT_LOOSE_OBJECT)
713
-
714
- #define FSYNC_COMPONENTS_COMMITTED (FSYNC_COMPONENTS_OBJECTS | \
715
- FSYNC_COMPONENT_REFERENCE)
716
-
717
- #define FSYNC_COMPONENTS_ADDED (FSYNC_COMPONENTS_COMMITTED | \
718
- FSYNC_COMPONENT_INDEX)
719
-
720
- #define FSYNC_COMPONENTS_ALL (FSYNC_COMPONENT_LOOSE_OBJECT | \
721
- FSYNC_COMPONENT_PACK | \
722
- FSYNC_COMPONENT_PACK_METADATA | \
723
- FSYNC_COMPONENT_COMMIT_GRAPH | \
724
- FSYNC_COMPONENT_INDEX | \
725
- FSYNC_COMPONENT_REFERENCE)
726
-
727
- #ifndef FSYNC_COMPONENTS_PLATFORM_DEFAULT
728
- #define FSYNC_COMPONENTS_PLATFORM_DEFAULT FSYNC_COMPONENTS_DEFAULT
729
- #endif
730
-
731
- /*
732
- * A bitmask indicating which components of the repo should be fsynced.
733
- */
734
- extern enum fsync_component fsync_components ;
735
- extern int fsync_object_files ;
736
- extern int use_fsync ;
737
-
738
- enum fsync_method {
739
- FSYNC_METHOD_FSYNC ,
740
- FSYNC_METHOD_WRITEOUT_ONLY ,
741
- FSYNC_METHOD_BATCH ,
742
- };
743
-
744
- extern enum fsync_method fsync_method ;
745
-
746
689
#define MTIME_CHANGED 0x0001
747
690
#define CTIME_CHANGED 0x0002
748
691
#define OWNER_CHANGED 0x0004
@@ -1045,29 +988,12 @@ int update_server_info(int);
1045
988
extern const char * git_mailmap_file ;
1046
989
extern const char * git_mailmap_blob ;
1047
990
1048
- /* IO helper functions */
1049
- void maybe_flush_or_die (FILE * , const char * );
1050
- __attribute__((format (printf , 2 , 3 )))
1051
- void fprintf_or_die (FILE * , const char * fmt , ...);
1052
- void fwrite_or_die (FILE * f , const void * buf , size_t count );
1053
- void fflush_or_die (FILE * f );
1054
-
1055
991
#define COPY_READ_ERROR (-2)
1056
992
#define COPY_WRITE_ERROR (-3)
1057
993
int copy_fd (int ifd , int ofd );
1058
994
int copy_file (const char * dst , const char * src , int mode );
1059
995
int copy_file_with_time (const char * dst , const char * src , int mode );
1060
996
1061
- void write_or_die (int fd , const void * buf , size_t count );
1062
- void fsync_or_die (int fd , const char * );
1063
- int fsync_component (enum fsync_component component , int fd );
1064
- void fsync_component_or_die (enum fsync_component component , int fd , const char * msg );
1065
-
1066
- static inline int batch_fsync_enabled (enum fsync_component component )
1067
- {
1068
- return (fsync_components & component ) && (fsync_method == FSYNC_METHOD_BATCH );
1069
- }
1070
-
1071
997
/* pager.c */
1072
998
void setup_pager (void );
1073
999
int pager_in_use (void );
0 commit comments