From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jeff King <peff@peff.net>,
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] strbuf_stripspace(): rename skip_comments arg to strip_comments
Date: Tue, 02 May 2023 13:00:58 -0600 [thread overview]
Message-ID: <64515dea5c566_1ba2d29487@chronos.notmuch> (raw)
In-Reply-To: <20230427083253.GA1478679@coredump.intra.peff.net>
Jeff King wrote:
> I'll quote liberally from the original below:
>
> On Thu, Mar 23, 2023 at 05:22:34PM +0100, Oswald Buddenhagen wrote:
>
> > That makes its function much clearer and more consistent with the
> > context.
> >
> > Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
> > ---
> > strbuf.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/strbuf.c b/strbuf.c
> > index 1c57ac6574..49e8beaa4c 100644
> > --- a/strbuf.c
> > +++ b/strbuf.c
> > @@ -1118,10 +1118,10 @@ static size_t cleanup(char *line, size_t len)
> > *
> > * If last line does not have a newline at the end, one is added.
> > *
> > - * Enable skip_comments to skip every line starting with comment
> > + * Enable strip_comments to strip every line starting with a comment
> > * character.
> > */
> > -void strbuf_stripspace(struct strbuf *sb, int skip_comments)
> > +void strbuf_stripspace(struct strbuf *sb, int strip_comments)
>
> I don't have a strong opinion either way. The original name was just
> copied from stripspace()'s similar parameter, which came from 9690c118fa
> (Fix git-stripspace to process correctly long lines and spaces.,
> 2007-06-25). I don't think it carries any particular significance,
> though I find either name easy enough to understand.
To me strip_comments makes more sense, because it implies an active
action, skip_comments implies nothing will be done on them.
--
Felipe Contreras
prev parent reply other threads:[~2023-05-02 19:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 16:22 [PATCH] strbuf_stripspace(): rename skip_comments arg to strip_comments Oswald Buddenhagen
2023-04-27 7:49 ` Oswald Buddenhagen
2023-04-27 8:32 ` Jeff King
2023-05-02 19:00 ` Felipe Contreras [this message]
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=64515dea5c566_1ba2d29487@chronos.notmuch \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=oswald.buddenhagen@gmx.de \
--cc=peff@peff.net \
/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).