Skip to content

Commit

Permalink
sha1_file: make check_and_freshen_file() non static
Browse files Browse the repository at this point in the history
This function will be used in a commit soon, so let's make
it available globally.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
chriscool authored and gitster committed Mar 1, 2017
1 parent e77cf4e commit 6a5e6f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,9 @@ extern int has_pack_index(const unsigned char *sha1);

extern void assert_sha1_type(const unsigned char *sha1, enum object_type expect);

/* Helper to check and "touch" a file */
extern int check_and_freshen_file(const char *fn, int freshen);

extern const signed char hexval_table[256];
static inline unsigned int hexval(unsigned char c)
{
Expand Down
2 changes: 1 addition & 1 deletion sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ static int freshen_file(const char *fn)
* either does not exist on disk, or has a stale mtime and may be subject to
* pruning).
*/
static int check_and_freshen_file(const char *fn, int freshen)
int check_and_freshen_file(const char *fn, int freshen)
{
if (access(fn, F_OK))
return 0;
Expand Down

0 comments on commit 6a5e6f5

Please sign in to comment.