Commit 6e6ed3e
builtin/config: do not die in
When trying to parse an invalid color via `get_color()` we die. We're
about to introduce another caller in a subsequent commit though that has
its own error handling, so dying is a bit drastic there. Furthermore,
the only caller that we already have right now already knows to handle
errors in other branches that don't call `get_color()`.
Convert the function to instead return an error code to improve its
flexibility.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>get_color()
1 parent 7f89ad8 commit 6e6ed3e
1 file changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
| 550 | + | |
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
| 557 | + | |
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
560 | 561 | | |
561 | 562 | | |
562 | 563 | | |
563 | | - | |
564 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
565 | 568 | | |
566 | 569 | | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
567 | 573 | | |
| 574 | + | |
568 | 575 | | |
569 | 576 | | |
570 | 577 | | |
| |||
1390 | 1397 | | |
1391 | 1398 | | |
1392 | 1399 | | |
1393 | | - | |
| 1400 | + | |
1394 | 1401 | | |
1395 | 1402 | | |
1396 | 1403 | | |
| |||
0 commit comments