summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-07-07 16:31:58 -0400
committerJunio C Hamano <gitster@pobox.com>2016-07-07 14:23:06 -0700
commit9453f9524774174b77bd5fc92c87b365198fc339 (patch)
treec978b5caa8822f3498819931728ba9cb9daef329 /cache.h
parent05219a1276341e72d8082d76b7f5ed394b7437a4 (diff)
downloadgit-jk/no-write-file-gently.tar.gz
write_file(): drop "gently" formjk/no-write-file-gently
We have two forms of write_file(): one that dies, and one that returns an error. However, the latter has only a single caller, which immediately dies anyway (after producing a message that is not really any more informative than write_file's generic die(), and arguably worse because it does not give the actual filename). Let's convert that site to use the non-gentle form. At that point the gentle form has no callers, and we can simplify the implementation of write_file. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 6049f86711..3f6ae242df 100644
--- a/cache.h
+++ b/cache.h
@@ -1734,8 +1734,7 @@ static inline ssize_t write_str_in_full(int fd, const char *str)
return write_in_full(fd, str, strlen(str));
}
-extern int write_file(const char *path, const char *fmt, ...);
-extern int write_file_gently(const char *path, const char *fmt, ...);
+extern void write_file(const char *path, const char *fmt, ...);
/* pager.c */
extern void setup_pager(void);