From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: Re: [PATCH 0/2] Simplify "commented" API functions
Date: Thu, 12 Sep 2024 14:57:40 -0700 [thread overview]
Message-ID: <xmqq8qvw357v.fsf@gitster.g> (raw)
In-Reply-To: <20240912205301.1809355-1-gitster@pobox.com> (Junio C. Hamano's message of "Thu, 12 Sep 2024 13:52:59 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> [earlier] https://lore.kernel.org/git/xmqq7cn4g3nx.fsf@gitster.g/
>
> Junio C Hamano (2):
> strbuf: retire strbuf_commented_addf()
> strbuf: retire strbuf_commented_lines()
This of course has a semantic conflict with the change that hides
not just "the_repository" and functions that implicitly use that
variable but other unrelated globals from environment.h behind a
compatibility macro.
A trivial merge-fix to be used to annotate the merge to make it an
evil merge whose result compiles looks like this:
merge-fix/jc/strbuf-commented-something
diff --git a/strbuf.c b/strbuf.c
index 05a6dc944b..cb972b07f7 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -7,6 +7,14 @@
#include "utf8.h"
#include "date.h"
+/*
+ * We do not need the_repository at all, but the comment_line_str is
+ * hidden behind USE_THE_REPOSITORY_VARIABLE CPP macro. We could
+ * #define it before including "envirnoment.h". Or we can make an
+ * external declaration ourselves here.
+ */
+extern const char *comment_line_str;
+
int starts_with(const char *str, const char *prefix)
{
for (; ; str++, prefix++)
next prev parent reply other threads:[~2024-09-12 21:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 20:52 [PATCH 0/2] Simplify "commented" API functions Junio C Hamano
2024-09-12 20:53 ` [PATCH 1/2] strbuf: retire strbuf_commented_addf() Junio C Hamano
2024-09-12 20:53 ` [PATCH 2/2] strbuf: retire strbuf_commented_lines() Junio C Hamano
2024-10-29 20:53 ` Kristoffer Haugsbakk
2024-09-12 21:57 ` Junio C Hamano [this message]
2024-09-13 6:15 ` [PATCH 0/2] Simplify "commented" API functions Patrick Steinhardt
2024-09-13 17:23 ` 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=xmqq8qvw357v.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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).