@@ -31,8 +31,6 @@ static inline uintmax_t sz_fmt(size_t s) { return s; }
31
31
32
32
const unsigned char null_sha1 [20 ];
33
33
34
- static int git_open_noatime (const char * name , struct packed_git * p );
35
-
36
34
/*
37
35
* This is meant to hold a *small* number of objects that you would
38
36
* want read_sha1_file() to be able to return, but yet you do not want
@@ -227,6 +225,7 @@ struct alternate_object_database *alt_odb_list;
227
225
static struct alternate_object_database * * alt_odb_tail ;
228
226
229
227
static void read_info_alternates (const char * alternates , int depth );
228
+ static int git_open_noatime (const char * name );
230
229
231
230
/*
232
231
* Prepare alternate object database registry.
@@ -360,7 +359,7 @@ static void read_info_alternates(const char * relative_base, int depth)
360
359
int fd ;
361
360
362
361
sprintf (path , "%s/%s" , relative_base , alt_file_name );
363
- fd = git_open_noatime (path , NULL );
362
+ fd = git_open_noatime (path );
364
363
if (fd < 0 )
365
364
return ;
366
365
if (fstat (fd , & st ) || (st .st_size == 0 )) {
@@ -475,7 +474,7 @@ static int check_packed_git_idx(const char *path, struct packed_git *p)
475
474
struct pack_idx_header * hdr ;
476
475
size_t idx_size ;
477
476
uint32_t version , nr , i , * index ;
478
- int fd = git_open_noatime (path , p );
477
+ int fd = git_open_noatime (path );
479
478
struct stat st ;
480
479
481
480
if (fd < 0 )
@@ -757,7 +756,7 @@ static int open_packed_git_1(struct packed_git *p)
757
756
while (pack_max_fds <= pack_open_fds && unuse_one_window (NULL , -1 ))
758
757
; /* nothing */
759
758
760
- p -> pack_fd = git_open_noatime (p -> pack_name , p );
759
+ p -> pack_fd = git_open_noatime (p -> pack_name );
761
760
if (p -> pack_fd < 0 || fstat (p -> pack_fd , & st ))
762
761
return -1 ;
763
762
pack_open_fds ++ ;
@@ -1145,7 +1144,7 @@ int check_sha1_signature(const unsigned char *sha1, void *map, unsigned long siz
1145
1144
return hashcmp (sha1 , real_sha1 ) ? -1 : 0 ;
1146
1145
}
1147
1146
1148
- static int git_open_noatime (const char * name , struct packed_git * p )
1147
+ static int git_open_noatime (const char * name )
1149
1148
{
1150
1149
static int sha1_file_open_flag = O_NOATIME ;
1151
1150
@@ -1170,7 +1169,7 @@ static int open_sha1_file(const unsigned char *sha1)
1170
1169
char * name = sha1_file_name (sha1 );
1171
1170
struct alternate_object_database * alt ;
1172
1171
1173
- fd = git_open_noatime (name , NULL );
1172
+ fd = git_open_noatime (name );
1174
1173
if (fd >= 0 )
1175
1174
return fd ;
1176
1175
@@ -1179,7 +1178,7 @@ static int open_sha1_file(const unsigned char *sha1)
1179
1178
for (alt = alt_odb_list ; alt ; alt = alt -> next ) {
1180
1179
name = alt -> name ;
1181
1180
fill_sha1_path (name , sha1 );
1182
- fd = git_open_noatime (alt -> base , NULL );
1181
+ fd = git_open_noatime (alt -> base );
1183
1182
if (fd >= 0 )
1184
1183
return fd ;
1185
1184
}
0 commit comments