Skip to content

Commit 6a5e6f5

Browse files
chriscoolgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e77cf4e commit 6a5e6f5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cache.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,9 @@ extern int has_pack_index(const unsigned char *sha1);
11701170

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

1173+
/* Helper to check and "touch" a file */
1174+
extern int check_and_freshen_file(const char *fn, int freshen);
1175+
11731176
extern const signed char hexval_table[256];
11741177
static inline unsigned int hexval(unsigned char c)
11751178
{

sha1_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ static int freshen_file(const char *fn)
601601
* either does not exist on disk, or has a stale mtime and may be subject to
602602
* pruning).
603603
*/
604-
static int check_and_freshen_file(const char *fn, int freshen)
604+
int check_and_freshen_file(const char *fn, int freshen)
605605
{
606606
if (access(fn, F_OK))
607607
return 0;

0 commit comments

Comments
 (0)