Commit dae197f
builtin/apply: make parse_single_patch() return -1 on error
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, parse_single_patch() should return a negative
integer instead of calling die().
Let's do that by using error() and let's adjust the related test
cases accordingly.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent b654b34 commit dae197f
2 files changed
+15
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1671 | 1671 | | |
1672 | 1672 | | |
1673 | 1673 | | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1674 | 1678 | | |
1675 | 1679 | | |
1676 | 1680 | | |
| |||
1688 | 1692 | | |
1689 | 1693 | | |
1690 | 1694 | | |
1691 | | - | |
1692 | | - | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1693 | 1699 | | |
1694 | 1700 | | |
1695 | 1701 | | |
| |||
1725 | 1731 | | |
1726 | 1732 | | |
1727 | 1733 | | |
1728 | | - | |
| 1734 | + | |
1729 | 1735 | | |
1730 | | - | |
| 1736 | + | |
1731 | 1737 | | |
1732 | 1738 | | |
1733 | 1739 | | |
| |||
2029 | 2035 | | |
2030 | 2036 | | |
2031 | 2037 | | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
2032 | 2041 | | |
2033 | 2042 | | |
2034 | 2043 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
0 commit comments