tempfile: replace die("BUG") with BUG()
commit9b028aa45a2016ae0dbdfeb85ad9d43f2017db0d
authorJeff King <peff@peff.net>
Tue, 5 Sep 2017 12:14:43 +0000 (5 08:14 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Sep 2017 08:19:53 +0000 (6 17:19 +0900)
tree5208c5c116ffeb67bec90c1d2e00d71631152739
parentf5b4dc7668b6c8d71432af9f9ddad6f7c62d284e
tempfile: replace die("BUG") with BUG()

Compared to die(), using BUG() triggers abort(). That may
give us an actual coredump, which should make it easier to
get a stack trace. And since the programming error for these
assertions is not in the functions themselves but in their
callers, such a stack trace is needed to actually find the
source of the bug.

In addition, abort() raises SIGABRT, which is more likely to
be caught by our test suite.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tempfile.c