Commit dde74d7
run-command: use BUG() to report bugs, not die()
The slightly misleading name die_bug() of the function intended to
report a bug is actually called always, and only reports a bug if the
passed-in parameter `err` is non-zero.
It uses die_errno() to report the bug, to helpfully include the error
message corresponding to `err`.
However, as these messages indicate bugs, we really should use BUG().
And as BUG() is a macro to be able to report the exact file and line
number, we need to convert die_bug() to a macro instead of only
replacing the die_errno() by a call to BUG().
While at it, use a name more indicative of the purpose: CHECK_BUG().
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent a86303c commit dde74d7
1 file changed
+10
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
483 | 480 | | |
484 | 481 | | |
485 | 482 | | |
| |||
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
494 | | - | |
| 491 | + | |
495 | 492 | | |
496 | | - | |
| 493 | + | |
497 | 494 | | |
498 | 495 | | |
499 | 496 | | |
| |||
504 | 501 | | |
505 | 502 | | |
506 | 503 | | |
507 | | - | |
| 504 | + | |
508 | 505 | | |
509 | | - | |
| 506 | + | |
510 | 507 | | |
511 | 508 | | |
512 | 509 | | |
| |||
0 commit comments