summaryrefslogtreecommitdiff
path: root/levenshtein.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2016-08-08 21:03:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-11 19:41:46 (GMT)
commitb654b34c1cf877709febb602991f46e7ba0d947d (patch)
tree90367b55dae0dfcf095b7d6f42790a4a96264869 /levenshtein.c
parent5950851e44fc6f19e9fc9261bac4a61e59fc5121 (diff)
downloadgit-b654b34c1cf877709febb602991f46e7ba0d947d.zip
git-b654b34c1cf877709febb602991f46e7ba0d947d.tar.gz
git-b654b34c1cf877709febb602991f46e7ba0d947d.tar.bz2
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 'levenshtein.c')
0 files changed, 0 insertions, 0 deletions