Commit 739d8a1
builtin/apply: make try_create_file() 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", try_create_file() should return -1 in case of
error.
Unfortunately try_create_file() currently returns -1 to signal a
recoverable error. To fix that, let's make it return 1 in case of
a recoverable error and -1 in case of an unrecoverable error.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent ccceb7b commit 739d8a1
1 file changed
Lines changed: 33 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4150 | 4150 | | |
4151 | 4151 | | |
4152 | 4152 | | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
| 4156 | + | |
| 4157 | + | |
| 4158 | + | |
4153 | 4159 | | |
4154 | 4160 | | |
4155 | | - | |
| 4161 | + | |
4156 | 4162 | | |
4157 | 4163 | | |
4158 | 4164 | | |
4159 | 4165 | | |
4160 | 4166 | | |
4161 | 4167 | | |
4162 | | - | |
| 4168 | + | |
4163 | 4169 | | |
4164 | 4170 | | |
4165 | 4171 | | |
4166 | 4172 | | |
4167 | 4173 | | |
4168 | 4174 | | |
4169 | | - | |
| 4175 | + | |
4170 | 4176 | | |
4171 | 4177 | | |
4172 | 4178 | | |
4173 | | - | |
| 4179 | + | |
4174 | 4180 | | |
4175 | 4181 | | |
4176 | 4182 | | |
4177 | 4183 | | |
4178 | 4184 | | |
4179 | | - | |
| 4185 | + | |
| 4186 | + | |
| 4187 | + | |
| 4188 | + | |
4180 | 4189 | | |
4181 | 4190 | | |
4182 | | - | |
4183 | | - | |
4184 | | - | |
| 4191 | + | |
| 4192 | + | |
| 4193 | + | |
| 4194 | + | |
4185 | 4195 | | |
4186 | 4196 | | |
4187 | 4197 | | |
| |||
4195 | 4205 | | |
4196 | 4206 | | |
4197 | 4207 | | |
| 4208 | + | |
| 4209 | + | |
4198 | 4210 | | |
4199 | 4211 | | |
4200 | | - | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
4201 | 4217 | | |
4202 | 4218 | | |
4203 | 4219 | | |
4204 | 4220 | | |
4205 | 4221 | | |
4206 | | - | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
4207 | 4226 | | |
4208 | 4227 | | |
4209 | 4228 | | |
| |||
4222 | 4241 | | |
4223 | 4242 | | |
4224 | 4243 | | |
4225 | | - | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
4226 | 4248 | | |
4227 | 4249 | | |
4228 | 4250 | | |
| |||
0 commit comments