summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-05-22 12:41:57 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-05-22 12:41:57 -0700
commitddaf4e2e9a8b38185405205ddead638cf052728e (patch)
tree67c406d62df91a583c2a7a34af92c1317e6b966f /cache.h
parentMerge branch 'mh/clone-verbosity-fix' (diff)
parentfilter_buffer_or_fd(): ignore EPIPE (diff)
downloadtgif-ddaf4e2e9a8b38185405205ddead638cf052728e.tar.xz
Merge branch 'jc/ignore-epipe-in-filter'
Filter scripts were run with SIGPIPE disabled on the Git side, expecting that they may not read what Git feeds them to filter. We however treated a filter that does not read its input fully before exiting as an error. This changes semantics, but arguably in a good way. If a filter can produce its output without consuming its input using whatever magic, we now let it do so, instead of diagnosing it as a programming error. * jc/ignore-epipe-in-filter: filter_buffer_or_fd(): ignore EPIPE copy.c: make copy_fd() report its status silently
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index c97d8071e1..1f4226be15 100644
--- a/cache.h
+++ b/cache.h
@@ -1541,9 +1541,13 @@ extern const char *git_mailmap_blob;
extern void maybe_flush_or_die(FILE *, const char *);
__attribute__((format (printf, 2, 3)))
extern void fprintf_or_die(FILE *, const char *fmt, ...);
+
+#define COPY_READ_ERROR (-2)
+#define COPY_WRITE_ERROR (-3)
extern int copy_fd(int ifd, int ofd);
extern int copy_file(const char *dst, const char *src, int mode);
extern int copy_file_with_time(const char *dst, const char *src, int mode);
+
extern void write_or_die(int fd, const void *buf, size_t count);
extern int write_or_whine(int fd, const void *buf, size_t count, const char *msg);
extern int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg);