From: Junio C Hamano <gitster@pobox.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: Ivan Tse via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
Ivan Tse <ivan.tse1@gmail.com>
Subject: Re: [PATCH v3] refs: return conflict error when checking packed refs
Date: Mon, 06 May 2024 12:01:23 -0700 [thread overview]
Message-ID: <xmqqttjaydbw.fsf@gitster.g> (raw)
In-Reply-To: <CAOLa=ZSre3f+0SR-_migfkPONqhinobKjU=NnGOJ_sTNM_L5ug@mail.gmail.com> (Karthik Nayak's message of "Mon, 6 May 2024 04:40:46 -0700")
Karthik Nayak <karthik.188@gmail.com> writes:
>> diff --git a/refs/files-backend.c b/refs/files-backend.c
>> index a098d14ea00..97473f377d1 100644
>> --- a/refs/files-backend.c
>> +++ b/refs/files-backend.c
>> @@ -794,8 +794,10 @@ static int lock_raw_ref(struct files_ref_store *refs,
>> */
>> if (refs_verify_refname_available(
>> refs->packed_ref_store, refname,
>> - extras, NULL, err))
>> + extras, NULL, err)) {
>> + ret = TRANSACTION_NAME_CONFLICT;
>> goto error_return;
>> + }
>> }
>>
>> ret = 0;
>>
>
> Shouldn't we also do this change in `lock_ref_oid_basic` where we gather
> the same lock again for creating the reflog entry?
An interesting question.
next prev parent reply other threads:[~2024-05-06 19:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 14:50 [PATCH] refs: return conflict error when checking packed refs Ivan Tse via GitGitGadget
2024-05-02 12:38 ` Patrick Steinhardt
2024-05-03 4:50 ` [PATCH v2] " Ivan Tse via GitGitGadget
2024-05-03 6:38 ` Patrick Steinhardt
2024-05-04 3:04 ` [PATCH v3] " Ivan Tse via GitGitGadget
2024-05-06 6:47 ` Patrick Steinhardt
2024-05-06 11:40 ` Karthik Nayak
2024-05-06 19:01 ` Junio C Hamano [this message]
2024-05-07 5:51 ` Ivan Tse
2024-05-07 13:37 ` Karthik Nayak
2024-05-08 1:39 ` Ivan Tse
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=xmqqttjaydbw.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=ivan.tse1@gmail.com \
--cc=karthik.188@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.