Skip to content

Commit ec73f58

Browse files
vmggitster
authored andcommitted
sha1_file: export git_open_noatime
The `git_open_noatime` helper can be of general interest for other consumers of git's different on-disk formats. Signed-off-by: Vicent Marti <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a330de3 commit ec73f58

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

cache.h

+1
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ extern int hash_sha1_file(const void *buf, unsigned long len, const char *type,
780780
extern int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *return_sha1);
781781
extern int pretend_sha1_file(void *, unsigned long, enum object_type, unsigned char *);
782782
extern int force_object_loose(const unsigned char *sha1, time_t mtime);
783+
extern int git_open_noatime(const char *name);
783784
extern void *map_sha1_file(const unsigned char *sha1, unsigned long *size);
784785
extern int unpack_sha1_header(git_zstream *stream, unsigned char *map, unsigned long mapsize, void *buffer, unsigned long bufsiz);
785786
extern int parse_sha1_header(const char *hdr, unsigned long *sizep);

sha1_file.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,6 @@ char *sha1_pack_index_name(const unsigned char *sha1)
239239
struct alternate_object_database *alt_odb_list;
240240
static struct alternate_object_database **alt_odb_tail;
241241

242-
static int git_open_noatime(const char *name);
243-
244242
/*
245243
* Prepare alternate object database registry.
246244
*
@@ -1357,7 +1355,7 @@ int check_sha1_signature(const unsigned char *sha1, void *map,
13571355
return hashcmp(sha1, real_sha1) ? -1 : 0;
13581356
}
13591357

1360-
static int git_open_noatime(const char *name)
1358+
int git_open_noatime(const char *name)
13611359
{
13621360
static int sha1_file_open_flag = O_NOATIME;
13631361

0 commit comments

Comments
 (0)