From e3b1e3bdc0aa5fa6a474874a2395ae0584b2aea7 Mon Sep 17 00:00:00 2001 From: Pranit Bauva Date: Wed, 2 Jan 2019 07:38:32 -0800 Subject: wrapper: move is_empty_file() and rename it as is_empty_or_missing_file() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit is_empty_file() can help to refactor a lot of code. This will be very helpful in porting "git bisect" to C. Suggested-by: Torsten Bögershausen Mentored-by: Lars Schneider Mentored-by: Christian Couder Signed-off-by: Pranit Bauva Signed-off-by: Junio C Hamano --- cache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index ca36b44ee0..9ff7e56b74 100644 --- a/cache.h +++ b/cache.h @@ -1788,4 +1788,7 @@ void safe_create_dir(const char *dir, int share); */ extern int print_sha1_ellipsis(void); +/* Return 1 if the file is empty or does not exists, 0 otherwise. */ +extern int is_empty_or_missing_file(const char *filename); + #endif /* CACHE_H */ -- cgit v1.3-5-g9baa