diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-05-22 12:41:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-22 12:41:57 -0700 |
commit | ddaf4e2e9a8b38185405205ddead638cf052728e (patch) | |
tree | 67c406d62df91a583c2a7a34af92c1317e6b966f /cache.h | |
parent | 5bf66689d5a4ddc4ce7b3b88a15f6bcf6a0c13fa (diff) | |
parent | 0c4dd67a048b39470b9b95912e4912fecc405a85 (diff) | |
download | git-ddaf4e2e9a8b38185405205ddead638cf052728e.tar.gz |
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.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |