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

Re: [PATCH 4/5] packed-backend: remove stub BUG(...) functions

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 17, 2022, 17:39 UTC
Message-ID
<xmqqlex8h40g.fsf@gitster.g>
In-Reply-To
<patch-4.5-c9a7004bc38-20220317T171618Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 12 quoted lines
> -	.for_each_reflog_ent = packed_for_each_reflog_ent,
> -	.for_each_reflog_ent_reverse = packed_for_each_reflog_ent_reverse,
> -	.reflog_exists = packed_reflog_exists,
> -	.create_reflog = packed_create_reflog,
> -	.delete_reflog = packed_delete_reflog,
> -	.reflog_expire = packed_reflog_expire
> +	.for_each_reflog_ent = NULL,
> +	.for_each_reflog_ent_reverse = NULL,
> +	.reflog_exists = NULL,
> +	.create_reflog = NULL,
> +	.delete_reflog = NULL,
> +	.reflog_expire = NULL,

Yup, the entry in vtable being set to NULL is a more direct sign the readers would appreciate than a name natural for the method, whose definition needs to be consulted before the readers can realize that it is a "missing" method.

Very sensible.
Thanks.
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 6 of 11 in “refs: designated init & missing debug in ps/fetch-mirror-optim”
  1. 0/5 refs: designated init & missing debug in ps/fetch-mirror-optimÆvar Arnfjörð Bjarmason, Mar 17, 2022
  2. 1/5 refs: use designated initializers for "struct ref_storage_be"Ævar Arnfjörð Bjarmason, Mar 17, 2022
  3. 2/5 refs: use designated initializers for "struct ref_iterator_vtable"Ævar Arnfjörð Bjarmason, Mar 17, 2022
  4. 3/5 misc *.c: use designated initializers for struct assignmentsÆvar Arnfjörð Bjarmason, Mar 17, 2022
  5. 4/5 packed-backend: remove stub BUG(...) functionsÆvar Arnfjörð Bjarmason, Mar 17, 2022
  6. Junio C HamanoMar 17, 2022
  7. 5/5 refs debug: add a wrapper for "read_symbolic_ref"Ævar Arnfjörð Bjarmason, Mar 17, 2022
  8. Han-Wen NienhuysMar 17, 2022
  9. Ævar Arnfjörð BjarmasonMar 18, 2022
  10. Patrick SteinhardtMar 21, 2022
  11. Junio C HamanoMar 21, 2022

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.