]> git.ipfire.org Git - thirdparty/git.git/commitdiff
api docs: document BUG() in api-error-handling.txt
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 13 Apr 2021 09:08:20 +0000 (11:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Apr 2021 21:56:58 +0000 (14:56 -0700)
When the BUG() function was added in d8193743e08 (usage.c: add BUG()
function, 2017-05-12) these docs added in 1f23cfe0ef5 (doc: document
error handling functions and conventions, 2014-12-03) were not
updated. Let's do that.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/api-error-handling.txt

index ceeedd485c9650de33c10f5465189f4f1a69fc82..71486abb2f03849c8c6330a17820fb4272a043eb 100644 (file)
@@ -1,8 +1,11 @@
 Error reporting in git
 ======================
 
-`die`, `usage`, `error`, and `warning` report errors of various
-kinds.
+`BUG`, `die`, `usage`, `error`, and `warning` report errors of
+various kinds.
+
+- `BUG` is for failed internal assertions that should never happen,
+  i.e. a bug in git itself.
 
 - `die` is for fatal application errors.  It prints a message to
   the user and exits with status 128.