]> git.ipfire.org Git - thirdparty/git.git/commit - t/t4254-am-corrupt.sh
builtin/apply: make find_header() return -128 instead of die()ing
authorChristian Couder <christian.couder@gmail.com>
Mon, 8 Aug 2016 21:03:02 +0000 (23:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Aug 2016 19:41:46 +0000 (12:41 -0700)
commit5950851e44fc6f19e9fc9261bac4a61e59fc5121
treeace39a2c5bf09604002357a5b1dc61274c6ecd06
parent3bee345d7b6c7d95e9585b224320689979a58f9e
builtin/apply: make find_header() return -128 instead of die()ing

To libify `git apply` functionality we have to signal errors to the
caller instead of die()ing.

To do that in a compatible manner with the rest of the error handling
in builtin/apply.c, let's make find_header() return -128 instead of
calling die().

We could make it return -1, unfortunately find_header() already
returns -1 when no header is found.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c
t/t4254-am-corrupt.sh