git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"René Scharfe" <l.s.r@web.de>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v2 4/4] object.h: use BUG(...) no die("BUG: ...") in lookup_object_by_type()
Date: Tue,  7 Dec 2021 12:05:54 +0100	[thread overview]
Message-ID: <patch-v2-4.4-aaf952a9ede-20211207T110440Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-v2-0.4-00000000000-20211207T110440Z-avarab@gmail.com>

Adjust code added in 7463064b280 (object.h: add
lookup_object_by_type() function, 2021-06-22) to use the BUG()
function.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/object.c b/object.c
index 23a24e678a8..4be82c1e7bc 100644
--- a/object.c
+++ b/object.c
@@ -199,7 +199,7 @@ struct object *lookup_object_by_type(struct repository *r,
 	case OBJ_BLOB:
 		return (struct object *)lookup_blob(r, oid);
 	default:
-		die("BUG: unknown object type %d", type);
+		BUG("unknown object type %d", type);
 	}
 }
 
-- 
2.34.1.898.g5a552c2e5f0


      parent reply	other threads:[~2021-12-07 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 16:25 [PATCH 0/2] replace die("BUG: ...") with BUG("...") Ævar Arnfjörð Bjarmason
2021-12-06 16:25 ` [PATCH 1/2] pack-objects: use BUG(...) not die("BUG: ...") Ævar Arnfjörð Bjarmason
2021-12-06 16:25 ` [PATCH 2/2] strbuf.h: " Ævar Arnfjörð Bjarmason
2021-12-06 18:44 ` [PATCH 0/2] replace die("BUG: ...") with BUG("...") Junio C Hamano
2021-12-07 11:00   ` Ævar Arnfjörð Bjarmason
2021-12-07  0:24 ` [PATCH 3/2] " Junio C Hamano
2021-12-07 11:05 ` [PATCH v2 0/4] " Ævar Arnfjörð Bjarmason
2021-12-07 11:05   ` [PATCH v2 1/4] pack-objects: use BUG(...) not die("BUG: ...") Ævar Arnfjörð Bjarmason
2021-12-07 11:05   ` [PATCH v2 2/4] strbuf.h: " Ævar Arnfjörð Bjarmason
2021-12-07 11:05   ` [PATCH v2 3/4] pathspec: use BUG(...) not die("BUG:%s:%d....", <file>, <line>) Ævar Arnfjörð Bjarmason
2021-12-07 11:05   ` Ævar Arnfjörð Bjarmason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patch-v2-4.4-aaf952a9ede-20211207T110440Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).