diff options
author | Pranit Bauva <pranit.bauva@gmail.com> | 2019-01-02 18:38:32 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-02 21:23:02 +0300 |
commit | e3b1e3bdc0aa5fa6a474874a2395ae0584b2aea7 (patch) | |
tree | 386a67166934950ca7779382b767bd7a1416c4b9 /cache.h | |
parent | 0f30233a11f6d89fb387ddf96db64877adb90713 (diff) |
wrapper: move is_empty_file() and rename it as is_empty_or_missing_file()
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 <tboegi@web.de>
Mentored-by: Lars Schneider <larsxschneider@gmail.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 */ |