From 5867757d888e690eeafe8d6a68841623c4b8baa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 7 Dec 2021 12:05:51 +0100 Subject: pack-objects: use BUG(...) not die("BUG: ...") MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change this code added in da93d12b004 (pack-objects: be incredibly anal about stdio semantics, 2006-04-02) to use BUG() instead. See 1a07e59c3e2 (Update messages in preparation for i18n, 2018-07-21) for when the "BUG: " prefix was added, and [1] for background on the Solaris behavior that prompted the exhaustive error checking in this fgets() loop. 1. https://lore.kernel.org/git/824.1144007555@lotus.CS.Berkeley.EDU/ Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- builtin/pack-objects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/pack-objects.c') diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 1a3dd445f8..0b1f82cd3a 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -3397,7 +3397,7 @@ static void read_object_list_from_stdin(void) if (feof(stdin)) break; if (!ferror(stdin)) - die("BUG: fgets returned NULL, not EOF, not error!"); + BUG("fgets returned NULL, not EOF, not error!"); if (errno != EINTR) die_errno("fgets"); clearerr(stdin); -- cgit v1.2.3