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

Re: [PATCH] reftable: honor core.fsync

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 24, 2024, 17:22 UTC
Message-ID
<xmqq4jf2hcif.fsf@gitster.g>
In-Reply-To
<ZbDNVouHgr-J2ptC@tanuki>
Patrick Steinhardt <ps@pks.im> writes:
Show 8 quoted lines
>> The part about using NULL as the value to say "do not use any flusher"
>> still stands, though.  You do not have to expose noop_flush into the
>> global namespace that way.
>
> One benefit of explicitly using the `noop_flush()` function is that we
> make sure that all callsites that should provide a proper flushing
> function indeed do. A `noop_flush` in production code may raise some
> eyebrows, whereas a `NULL` value could easily be overlooked.

Very true. Another benefit is that at runtime we do not need any conditional deep inside the logic that calls the .flush method of the writer object.

Previous: Patrick SteinhardtNext: Kristoffer Haugsbakk
Message 6 of 10 in “reftable: honor core.fsync”
  1. reftable: honor core.fsyncJohn Cai via GitGitGadget, Jan 23, 2024
  2. Junio C HamanoJan 23, 2024
  3. John CaiJan 23, 2024
  4. Junio C HamanoJan 23, 2024
  5. Patrick SteinhardtJan 24, 2024
  6. Junio C HamanoJan 24, 2024
  7. Kristoffer HaugsbakkJan 23, 2024
  8. John CaiJan 23, 2024
  9. Patrick SteinhardtJan 29, 2024
  10. Junio C HamanoJan 29, 2024

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.