git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Shubham Kanodia <shubham.kanodia10@gmail.com>
Cc: Shubham Kanodia via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,  "Patrick Steinhardt [ ]" <ps@pks.im>,
	 Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH v2] remote: prefetch config
Date: Thu, 05 Sep 2024 10:54:33 -0700	[thread overview]
Message-ID: <xmqq1q1y2dgm.fsf@gitster.g> (raw)
In-Reply-To: <CAG=Um+0P8SgWo2sN3St8+PpBneQfDBoqnpnC6uMmYu2YOOaWmQ@mail.gmail.com> (Shubham Kanodia's message of "Thu, 5 Sep 2024 22:49:15 +0530")

Shubham Kanodia <shubham.kanodia10@gmail.com> writes:

> 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.


  reply	other threads:[~2024-09-05 17:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 17:59 [PATCH] remote: prefetch config Shubham Kanodia via GitGitGadget
2024-09-04 20:03 ` Derrick Stolee
2024-09-04 20:55   ` Junio C Hamano
2024-09-05  2:08     ` Derrick Stolee
2024-09-05  2:51       ` Shubham Kanodia
2024-09-05 15:00       ` Junio C Hamano
2024-09-05  2:52 ` [PATCH v2] " Shubham Kanodia via GitGitGadget
2024-09-05 16:06   ` Junio C Hamano
2024-09-05 16:43     ` Shubham Kanodia
2024-09-05 16:52       ` Junio C Hamano
2024-09-05 17:19         ` Shubham Kanodia
2024-09-05 17:54           ` Junio C Hamano [this message]
2024-09-05 16:45   ` [PATCH v3] " Shubham Kanodia via GitGitGadget
2024-09-05 19:43     ` [PATCH v4] " Shubham Kanodia via GitGitGadget
2024-09-05 20:57       ` Junio C Hamano
2024-09-06  9:42         ` Shubham Kanodia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq1q1y2dgm.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=ps@pks.im \
    --cc=shubham.kanodia10@gmail.com \
    --cc=stolee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).