Skip to content

Commit

Permalink
sha1_file: export git_open_noatime
Browse files Browse the repository at this point in the history
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 <tanoku@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Vicent Marti authored and Junio C Hamano committed Oct 24, 2013
1 parent a330de3 commit ec73f58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@ extern int hash_sha1_file(const void *buf, unsigned long len, const char *type,
extern int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *return_sha1);
extern int pretend_sha1_file(void *, unsigned long, enum object_type, unsigned char *);
extern int force_object_loose(const unsigned char *sha1, time_t mtime);
extern int git_open_noatime(const char *name);
extern void *map_sha1_file(const unsigned char *sha1, unsigned long *size);
extern int unpack_sha1_header(git_zstream *stream, unsigned char *map, unsigned long mapsize, void *buffer, unsigned long bufsiz);
extern int parse_sha1_header(const char *hdr, unsigned long *sizep);
Expand Down
4 changes: 1 addition & 3 deletions sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ char *sha1_pack_index_name(const unsigned char *sha1)
struct alternate_object_database *alt_odb_list;
static struct alternate_object_database **alt_odb_tail;

static int git_open_noatime(const char *name);

/*
* Prepare alternate object database registry.
*
Expand Down Expand Up @@ -1357,7 +1355,7 @@ int check_sha1_signature(const unsigned char *sha1, void *map,
return hashcmp(sha1, real_sha1) ? -1 : 0;
}

static int git_open_noatime(const char *name)
int git_open_noatime(const char *name)
{
static int sha1_file_open_flag = O_NOATIME;

Expand Down

0 comments on commit ec73f58

Please sign in to comment.