From: Junio C Hamano <gitster@pobox•com>
To: Jonathan Tan <jonathantanmy@google•com>
Cc: git@vger•kernel.org, Phillip Wood <phillip.wood123@gmail•com>,
Dragan Simic <dsimic@manjaro•org>
Subject: Re: [RFC PATCH 1/3] strbuf: make add_lines() public
Date: Tue, 31 Oct 2023 15:01:40 +0900 [thread overview]
Message-ID: <xmqq1qdb49ff.fsf@gitster.g> (raw)
In-Reply-To: <xmqqy1fj8y5m.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 31 Oct 2023 08:53:57 +0900")
Junio C Hamano <gitster@pobox•com> writes:
> Jonathan Tan <jonathantanmy@google•com> writes:
>
>> Subsequent patches will require the ability to add different prefixes
>> to different lines (depending on their contents), so make this
>> functionality available from outside strbuf.c.
>
> I do not think it is a good idea to force almost everybody to repeat
> themselves. As we can see here, all but just a single caller of
> strbuf_add_lines() with this patch pass the same prefix for both
> parameters. If we need to make the current strbuf.c:add_lines()
> also available to some specific callers, that is fine, but let's
> keep the simpler version that almost everybody uses as-is, and give
> the more complex and featureful one that is used only by selected
> callers a longer and more cumbersome name.
>
> Thanks.
Another practical downside of this patch is that it breaks other
in-flight topics that adds new users of strbuf_add_lines(), and that
breakage is totally unnecessary.
next prev parent reply other threads:[~2023-10-31 6:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 5:10 [PATCH 0/2] Avoid passing global comment_line_char repeatedly Junio C Hamano
2023-10-30 5:10 ` [PATCH 1/2] strbuf_commented_addf(): drop the comment_line_char parameter Junio C Hamano
2023-10-30 5:10 ` [PATCH 2/2] strbuf_add_commented_lines(): " Junio C Hamano
2023-10-30 5:36 ` [PATCH 0/2] Avoid passing global comment_line_char repeatedly Dragan Simic
2023-10-30 9:59 ` Phillip Wood
2023-10-30 20:22 ` [RFC PATCH 0/3] " Jonathan Tan
2023-10-30 20:22 ` [RFC PATCH 1/3] strbuf: make add_lines() public Jonathan Tan
2023-10-30 23:53 ` Junio C Hamano
2023-10-31 6:01 ` Junio C Hamano [this message]
2023-10-30 20:22 ` [RFC PATCH 2/3] strbuf_commented_addf(): drop the comment_line_char parameter Jonathan Tan
2023-10-31 5:19 ` Junio C Hamano
2023-10-31 22:24 ` Jonathan Tan
2023-10-31 23:54 ` Junio C Hamano
2023-10-30 20:22 ` [RFC PATCH 3/3] strbuf_add_commented_lines(): " Jonathan Tan
2023-10-31 22:28 ` [PATCH v2 0/4] Avoid passing global comment_line_char repeatedly Jonathan Tan
2023-10-31 22:28 ` [PATCH v2 1/4] strbuf_commented_addf(): drop the comment_line_char parameter Jonathan Tan
2023-10-31 22:28 ` [PATCH v2 2/4] strbuf_add_commented_lines(): " Jonathan Tan
2023-10-31 22:28 ` [PATCH v2 3/4] strbuf: make add_lines() public Jonathan Tan
2023-11-01 4:14 ` Junio C Hamano
2023-10-31 22:28 ` [PATCH v2 4/4] strbuf: move env-using functions to environment.c Jonathan Tan
2023-11-01 4:37 ` Junio C Hamano
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=xmqq1qdb49ff.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=dsimic@manjaro$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=jonathantanmy@google$(echo .)com \
--cc=phillip.wood123@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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