summaryrefslogtreecommitdiff
path: root/builtin/unpack-file.c
diff options
context:
space:
mode:
authorLibravatar Christian Couder <christian.couder@gmail.com>2016-08-08 23:03:03 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-08-11 12:41:46 -0700
commitb654b34c1cf877709febb602991f46e7ba0d947d (patch)
tree90367b55dae0dfcf095b7d6f42790a4a96264869 /builtin/unpack-file.c
parentbuiltin/apply: make find_header() return -128 instead of die()ing (diff)
downloadtgif-b654b34c1cf877709febb602991f46e7ba0d947d.tar.xz
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 'builtin/unpack-file.c')
0 files changed, 0 insertions, 0 deletions