Subject: Re: "lock file exists" when fetching in bare clone of repository

From: Junio C Hamano <[email-masked]>
Date: Thu, 28 Aug 2025 09:16:48 -0700

Karthik Nayak <[email-masked]> writes:

> This error type is bubbled up to `files_transaction_prepare()` which
> tries to lock each reference update by calling `lock_ref_for_update()`.
> So if the locking fails, we check if the rejection type can be ignored,
> which is done by calling `ref_transaction_maybe_set_rejected()`.
>
> Only during batched updates would errors be ignore and only for
> non-generic errors. So this change would specifically only apply for
> batched updates. Currently that is used by:
>
>     1. git fetch
>     2. git receive-pack
>     3. git update-ref --batch-updates
>
> And for all three scenarios I think it makes sense to add this in.

Thanks for an extra explanation.

These pieces of information would be necessary in the proposed log
message when it becomes a real patch.