From: Junio C Hamano <gitster@pobox.com>
To: Justin Tobler <jltobler@gmail.com>
Cc: eric.peijian@gmail.com, git@vger.kernel.org, ps@pks.im
Subject: Re: [PATCH 1/1] Add preparing state to reference-transaction hook
Date: Fri, 13 Mar 2026 16:09:57 -0700 [thread overview]
Message-ID: <xmqq7brf1g3e.fsf@gitster.g> (raw)
In-Reply-To: <abSWrcvm-smx92MY@denethor> (Justin Tobler's message of "Fri, 13 Mar 2026 18:05:46 -0500")
Justin Tobler <jltobler@gmail.com> writes:
> On 26/03/13 03:35PM, eric.peijian@gmail.com wrote:
>> diff --git a/refs.c b/refs.c
>> index 6fb8f9d10c..f1439476d3 100644
>> --- a/refs.c
>> +++ b/refs.c
>> @@ -2655,6 +2655,13 @@ int ref_transaction_prepare(struct ref_transaction *transaction,
>> if (ref_update_reject_duplicates(&transaction->refnames, err))
>> return REF_TRANSACTION_ERROR_GENERIC;
>>
>> + /* Preparing checks before locking references */
>> + ret = run_transaction_hook(transaction, "preparing");
>> + if (ret) {
>> + ref_transaction_abort(transaction, err);
>> + die(_("ref updates aborted by %s hook"), "preparing");
>
> Should "preparing" be marked for translation here?
It literally is one of the possible tokens reference-transaction
hook is given as its argument, so no, I do not think "preparing"
should be translated.
But the hook that interrupted the ref update is not "preparing"
hook. It is the "reference-transaction" hook. So the message
probably should say something like
the reference-transaction hook rejected ref updates at its
preparing phase
or something.
>> + }
>> +
>> ret = refs->be->transaction_prepare(refs, transaction, err);
>> if (ret)
>> return ret;
>> @@ -2662,7 +2669,7 @@ int ref_transaction_prepare(struct ref_transaction *transaction,
>> ret = run_transaction_hook(transaction, "prepared");
>> if (ret) {
>> ref_transaction_abort(transaction, err);
>> - die(_("ref updates aborted by hook"));
>> + die(_("ref updates aborted by %s hook"), "prepared");
>
> Same question here for "prepared"?
Ditto.
next prev parent reply other threads:[~2026-03-13 23:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 19:35 [PATCH 0/1] Add "preparing" phase to reference-transaction hook eric.peijian
2026-03-13 19:35 ` [PATCH 1/1] Add preparing state " eric.peijian
2026-03-13 21:20 ` Junio C Hamano
2026-03-16 3:09 ` Peijian Ju
2026-03-13 23:05 ` Justin Tobler
2026-03-13 23:09 ` Junio C Hamano [this message]
2026-03-16 3:09 ` Peijian Ju
2026-03-16 4:51 ` [PATCH v2 0/1] refs: add 'preparing' phase to the " Eric Ju
2026-03-16 4:51 ` [PATCH v2 1/1] " Eric Ju
2026-03-16 16:24 ` Junio C Hamano
2026-03-16 23:08 ` Peijian Ju
2026-03-16 7:03 ` [PATCH v2 0/1] " Patrick Steinhardt
2026-03-16 23:08 ` Peijian Ju
2026-03-17 2:36 ` [PATCH v3 " Eric Ju
2026-03-17 2:36 ` [PATCH v3 1/1] " Eric Ju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7brf1g3e.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=eric.peijian@gmail.com \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.