git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 28, 2025, 16:16 UTC
Message-ID
<xmqqy0r3whe7.fsf@gitster.g>
In-Reply-To
<CAOLa=ZRizMKRsP2wo-RJUksXAv1Hgx3XDGCO_ZGOwKpf6kAbQQ@mail.gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 14 quoted lines
> 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.

Previous: Karthik NayakNext: Karthik Nayak
Message 11 of 16 in “"lock file exists" when fetching in bare clone of repository”
  1. Joe DrewAug 20, 2025
  2. Jeff KingAug 20, 2025
  3. Patrick SteinhardtAug 21, 2025
  4. Jeff KingAug 21, 2025
  5. Patrick SteinhardtAug 21, 2025
  6. Junio C HamanoAug 21, 2025
  7. Patrick SteinhardtAug 22, 2025
  8. Karthik NayakAug 22, 2025
  9. Junio C HamanoAug 22, 2025
  10. Karthik NayakAug 28, 2025
  11. Junio C HamanoAug 28, 2025
  12. Karthik NayakSep 1, 2025
  13. Junio C HamanoAug 21, 2025
  14. Joe DrewAug 22, 2025
  15. Jeff KingAug 26, 2025
  16. Patrick SteinhardtSep 2, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.