From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 257991F9F3 for ; Tue, 13 Apr 2021 09:08:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236736AbhDMJJE (ORCPT ); Tue, 13 Apr 2021 05:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbhDMJIz (ORCPT ); Tue, 13 Apr 2021 05:08:55 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDE84C06175F for ; Tue, 13 Apr 2021 02:08:33 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id m3so18514343edv.5 for ; Tue, 13 Apr 2021 02:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LMOrHyxOs59oX83kcUuH3Jx8H2gUPvDlypaOfNOkQic=; b=vQSyE0bfSrBZFKOwfuTJVg2+QaVkIYgo0gdEY490oayp2tCark40MDNrEBu6Pye4+7 19ql2rj+fgfZOA8My4450mY9nKwV6jpLFggtUUIt23Juh4eJy+xhzrSUIYfswfgpn6ur 0ixCSeQZ4oZxCxLc02uQye2lsR+LDArUvRf8n9WSpZ+YBNCFx0c6KLsdsG9jZ8lfnwMG S2ptuD6T/KJ83z4Ey59MO7+dlHMtG3MuhP+m2iMFC46du0k8fsWUfool21GtsmPoWx0u r0PFyD5f1dAt4+mv1KLvKWPRzlcVR++nvmin64jZQOWPOVPCTFblEQiHLVbeFaNXyTNm yW+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LMOrHyxOs59oX83kcUuH3Jx8H2gUPvDlypaOfNOkQic=; b=qH+oG7/00FzZYUFFb8kMdzfckVuIfHmwXQYBxU3pUrpPxm4TApfKQPvnOsughZyago bXhR/+Eha5U41Yi9FEpWH/OHWGhP8BeTDYIjDOiqUzwT5i0P82Gxdlg1HKiEvWFywuDg It9JAAzVe9Ip1cxK2e4LaV9pu/4pvoyLSI02qCIS1dUdjur2I/2/j+JIIIennOKffYtl JXqZ3P7o91/P7cxFkGn00wRTgLawwltjsI9TFSnpVnl01bXZSB+G93wll8FSVMJOKD5y ZHw+I9e8MGTvDzWQ96BKuAPMv9pBBTF0tP5Qdbydvcwz2NUmI6KaHJXXyRyUA9bd3tVr 8K5w== X-Gm-Message-State: AOAM5315xHnHxnY9DD05F2zj2kgEkp73u7ah48GC6E8wCLkPO+PzETkU SPvityCpWLrKkXusPnUDSRBF7ACAk7L9wQ== X-Google-Smtp-Source: ABdhPJziWFQ1E8lNzpyHFTQdXzE//F3vET8Mii9Li89v7acqF7v+0k388/7OuavWMx9cv67ZNybdpg== X-Received: by 2002:a50:aad9:: with SMTP id r25mr34053106edc.125.1618304912033; Tue, 13 Apr 2021 02:08:32 -0700 (PDT) Received: from vm.nix.is (vm.nix.is. [2a01:4f8:120:2468::2]) by smtp.gmail.com with ESMTPSA id 28sm8918318edw.82.2021.04.13.02.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 02:08:31 -0700 (PDT) From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= To: git@vger.kernel.org Cc: Junio C Hamano , Jeff Hostetler , Jonathan Tan , Jeff King , Eric Sunshine , Bagas Sanjaya , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Subject: [PATCH v2 2/3] api docs: document BUG() in api-error-handling.txt Date: Tue, 13 Apr 2021 11:08:20 +0200 Message-Id: X-Mailer: git-send-email 2.31.1.645.g989d83ea6a6 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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 --- Documentation/technical/api-error-handling.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/technical/api-error-handling.txt b/Documentation/technical/api-error-handling.txt index ceeedd485c9..71486abb2f0 100644 --- a/Documentation/technical/api-error-handling.txt +++ b/Documentation/technical/api-error-handling.txt @@ -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. -- 2.31.1.645.g989d83ea6a6