diff options
author | Jeff King <peff@peff.net> | 2019-03-04 23:11:39 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-03-05 15:02:01 +0900 |
commit | 37c80012f1415bc4ff23def735a87cbd395bca31 (patch) | |
tree | e0bc7f5f016e97443f5ae9753cc52701123bdacd /t/t5100 | |
parent | Git 2.20.1 (diff) | |
download | tgif-37c80012f1415bc4ff23def735a87cbd395bca31.tar.xz |
fetch: avoid calling write_or_die()
The write_or_die() function has one quirk that a caller might not
expect: when it sees EPIPE from the write() call, it translates that
into a death by SIGPIPE. This doesn't change the overall behavior (the
program exits either way), but it does potentially confuse test scripts
looking for a non-signal exit code.
Let's switch away from using write_or_die() in a few code paths, which
will give us more consistent exit codes. It also gives us the
opportunity to write more descriptive error messages, since we have
context that write_or_die() does not.
Note that this won't do much by itself, since we'd typically be killed
by SIGPIPE before write_or_die() even gets a chance to do its thing.
That will be addressed in the next patch.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100')
0 files changed, 0 insertions, 0 deletions