From: Christian Couder Date: Mon, 27 Feb 2017 18:00:11 +0000 (+0100) Subject: sha1_file: make check_and_freshen_file() non static X-Git-Tag: v2.13.0-rc0~111^2~8 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6a5e6f5e4496d5647e9b11352d055efed434029e?ds=inline sha1_file: make check_and_freshen_file() non static This function will be used in a commit soon, so let's make it available globally. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- diff --git a/cache.h b/cache.h index e15b421b6f..f442f28189 100644 --- a/cache.h +++ b/cache.h @@ -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) { diff --git a/sha1_file.c b/sha1_file.c index 1173071859..f5303d955a 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -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;