Commit 5950851
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>1 parent 3bee345 commit 5950851
2 files changed
+29
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1419 | 1419 | | |
1420 | 1420 | | |
1421 | 1421 | | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1422 | 1430 | | |
1423 | 1431 | | |
1424 | 1432 | | |
| |||
1452 | 1460 | | |
1453 | 1461 | | |
1454 | 1462 | | |
1455 | | - | |
1456 | | - | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
1457 | 1466 | | |
1458 | 1467 | | |
1459 | 1468 | | |
| |||
1468 | 1477 | | |
1469 | 1478 | | |
1470 | 1479 | | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1478 | 1489 | | |
1479 | 1490 | | |
1480 | 1491 | | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
1484 | 1497 | | |
1485 | 1498 | | |
1486 | 1499 | | |
| |||
1996 | 2009 | | |
1997 | 2010 | | |
1998 | 2011 | | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
1999 | 2015 | | |
2000 | 2016 | | |
2001 | 2017 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments