From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB335C433F5 for ; Mon, 31 Jan 2022 17:46:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381086AbiAaRqg (ORCPT ); Mon, 31 Jan 2022 12:46:36 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:57642 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231629AbiAaRqf (ORCPT ); Mon, 31 Jan 2022 12:46:35 -0500 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 926121202BE; Mon, 31 Jan 2022 12:46:34 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=b79mv51pLG1yesVj72brxRENyFUgkhNtkEng1W YbBSk=; b=XIfgzjH+YdeyuNNxy1bJq2GMKyhgvOIoWYT1Pn/hEpGXn+o/ihFULS 1kzALFJ1RQBak2Ydygq10Hy0eC1uMoH7PyjZnS+7AR3QrIKe4ox6rer+zXaE49gN iYsSJLSpMBwuuosXOxfWyFasV2JZLG/e6vveTjSCREQzNU8OZzZJY= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 89FC51202BD; Mon, 31 Jan 2022 12:46:34 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [104.133.2.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id EE92D1202BC; Mon, 31 Jan 2022 12:46:33 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Taylor Blau Cc: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Git ML , Jonathan Tan Subject: Re: BUG: Various "advice.*" config doesn't work References: <220128.867dakcgj0.gmgdl@evledraar.gmail.com> Date: Mon, 31 Jan 2022 09:46:32 -0800 In-Reply-To: (Taylor Blau's message of "Mon, 31 Jan 2022 12:34:42 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: BB081DAA-82BD-11EC-89B8-CB998F0A682E-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Taylor Blau writes: > What I'm more or less trying to point out is that an unguarded advise() > function defeats the purpose of the advice API, which should exist to > avoid mistakes like these (where advice is printed to the user when they > have already opted out of that advice). advise() falls into the same category as die(), warning(), and error(). It is a way to consistently format (and with a better design to line-wrap, than its older brethren) messages. We do not have "die_if(condition, format, ...)", but if there were such a thing, that would be a good analogy to advice_if_enabled(). And a short-hand of die_if() would not make die() any unnecessary.