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

Re: [PATCH] refs: move REF_LOG_ONLY to refs-internal.h

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Sep 9, 2020, 09:35 UTC
Message-ID
<CAFQ2z_OYn6cC5SCgv-49pa9VQ2ZEhbeZ9aGn4e-C7tsnQ=qWow@mail.gmail.com>
In-Reply-To
<xmqqo8mfx4qd.fsf@gitster.c.googlers.com>
On Wed, Sep 9, 2020 at 12:50 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Hmph, I am not necessarily sure about "need to duplicate" [*1*], but
> I do agree with the patch text---the bit should not belong to a
> single "files-backend" backend.
>
> [Footnote]
>
> *1* obviously, a better alternative, if possible, would be to let
>     the more generic layer do so without forcing the backends to
>     duplicate.  But even if such a change were possible and we
>     decide to avoid duplication, it does not make sense to have this
>     bit specifically defined for the files-backend and nobody else.

I'm not sure if it is possible. REFS_LOG_ONLY is used in the split_head_update() which is called from the middle of the files_transaction_prepare(). In particular, it can happen after a number of locks have already been taken. If this moves into the generic layer, the head split happens before the locks are taken, which could alter behavior.

-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--

Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Previous: Junio C Hamano
Message 5 of 5 in “refs: move REF_LOG_ONLY to refs-internal.h”
  1. refs: move REF_LOG_ONLY to refs-internal.hHan-Wen Nienhuys via GitGitGadget, Aug 28, 2020
  2. Han-Wen NienhuysSep 8, 2020
  3. Junio C HamanoSep 8, 2020
  4. Junio C HamanoSep 8, 2020
  5. Han-Wen NienhuysSep 9, 2020

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.