From: Junio C Hamano Date: Mon, 16 Mar 2026 16:24:56 GMT Subject: Re: [PATCH v2 1/1] refs: add 'preparing' phase to the reference-transaction hook Message-ID: In-Reply-To: <20260316045102.70551-2-eric.peijian@gmail.com> Eric Ju writes: > + /* Preparing checks before locking references */ > + ret = run_transaction_hook(transaction, "preparing"); > + if (ret) { > + ref_transaction_abort(transaction, err); > + die(_("ref updates aborted by the reference-transaction hook at its %s state"), "preparing"); > + } On end-user's terminal, the above should look like fatal: ref updates aborted by the reference-transaction hook at its parparing state consuming more than 80 columns and having the varying part of the message at the very end. Can we shorten this and highlight the more important bits? Here is my attempt die(_("in '%s' phase, update aborted by the reference-transaction hook"), "preparing"); Enclosing the phase name in 'quotes' and moving it near the beginning are both my attempt to make it stand out more. Another thing you may want to consider is to extract the message to a separate constant, i.e., const char *abort_by_ref_transaction_hook[] = N_("in '%s' phase, update aborted by the reference-transaction hook"); and reuse at two places, perhaps? die(_(abort_by_ref_transaction_hook), "preparing");