diff options
author | Christian Couder <christian.couder@gmail.com> | 2016-08-08 23:03:03 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-11 12:41:46 -0700 |
commit | b654b34c1cf877709febb602991f46e7ba0d947d (patch) | |
tree | 90367b55dae0dfcf095b7d6f42790a4a96264869 /tar.h | |
parent | 5950851e44fc6f19e9fc9261bac4a61e59fc5121 (diff) | |
download | git-b654b34c1cf877709febb602991f46e7ba0d947d.tar.gz |
builtin/apply: make parse_chunk() return a negative integer on error
To libify `git apply` functionality we have to signal errors to the
caller instead of die()ing or exit()ing.
To do that in a compatible manner with the rest of the error handling
in builtin/apply.c, parse_chunk() should return a negative integer
instead of calling die() or exit().
As parse_chunk() is called only by apply_patch() which already
returns either -1 or -128 when an error happened, let's make it also
return -1 or -128.
This makes it compatible with what find_header() and parse_binary()
already return.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tar.h')
0 files changed, 0 insertions, 0 deletions