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

Re: [PATCH v2] remote: prefetch config

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 5, 2024, 17:54 UTC
Message-ID
<xmqq1q1y2dgm.fsf@gitster.g>
In-Reply-To
<CAG=Um+0P8SgWo2sN3St8+PpBneQfDBoqnpnC6uMmYu2YOOaWmQ@mail.gmail.com>
Shubham Kanodia <shubham.kanodia10@gmail.com> writes:
Show 15 quoted lines
> On Thu, Sep 5, 2024 at 10:22 PM Junio C Hamano <gitster@pobox.com> wrote:
>>
>> Shubham Kanodia <shubham.kanodia10@gmail.com> writes:
>>
>> >>
>> >>         int prefetch; /* is prefetch enabled? */
>> >>
>> > ...
>> > Updating my patch — please let me know if there's anything else I can
>> > improve here.
>>
>> Renaming the .prefetch member to .prefetch_enabled would eliminate
>> the need to add any comment on the member in the header file.
>
> Do you mean for the struct member here or also the config?

I do not think I mentioned anything about the name of the configuration variable, but if I did that was a mistake.

End-user facing configuration variables are often named after a feature that it enables or disables, so it can use the name without "enable". An int variable on the other hand can mean many other things, ranging from "how many times have we prefetched from here" to "does this remote allow prefetching?", so a more explicit name would often help.

Thanks.
Previous: Shubham KanodiaNext: Shubham Kanodia via GitGitGadget
Message 12 of 16 in “remote: prefetch config”
  1. remote: prefetch configShubham Kanodia via GitGitGadget, Sep 4, 2024
  2. Derrick StoleeSep 4, 2024
  3. Junio C HamanoSep 4, 2024
  4. Derrick StoleeSep 5, 2024
  5. Shubham KanodiaSep 5, 2024
  6. Junio C HamanoSep 5, 2024
  7. remote: prefetch configShubham Kanodia via GitGitGadget, Sep 5, 2024
  8. Junio C HamanoSep 5, 2024
  9. Shubham KanodiaSep 5, 2024
  10. Junio C HamanoSep 5, 2024
  11. Shubham KanodiaSep 5, 2024
  12. Junio C HamanoSep 5, 2024
  13. remote: prefetch configShubham Kanodia via GitGitGadget, Sep 5, 2024
  14. remote: prefetch configShubham Kanodia via GitGitGadget, Sep 5, 2024
  15. Junio C HamanoSep 5, 2024
  16. Shubham KanodiaSep 6, 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.