From: "Tony Tung via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>, Tony Tung <tonytung@merly.org>,
Tony Tung <tonytung@merly.org>, Tony Tung <tonytung@merly.org>
Subject: [PATCH v2 2/2] sequencer: fix remaining hardcoded comment char
Date: Tue, 31 Oct 2023 05:09:12 +0000 [thread overview]
Message-ID: <c9f4ff34dbdb7ba221e4203bb6551b80948dc71d.1698728953.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1603.v2.git.1698728952.gitgitgadget@gmail.com>
From: Tony Tung <tonytung@merly.org>
Signed-off-by: Tony Tung <tonytung@merly.org>
---
sequencer.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/sequencer.c b/sequencer.c
index 8c6666d5e43..bbadc3fb710 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1893,8 +1893,14 @@ static void update_squash_message_for_fixup(struct strbuf *msg)
size_t orig_msg_len;
int i = 1;
- strbuf_addf(&buf1, "# %s\n", _(first_commit_msg_str));
- strbuf_addf(&buf2, "# %s\n", _(skip_first_commit_msg_str));
+ strbuf_commented_addf(&buf1,
+ comment_line_char,
+ "%s\n",
+ _(first_commit_msg_str));
+ strbuf_commented_addf(&buf2,
+ comment_line_char,
+ "%s\n",
+ _(skip_first_commit_msg_str));
s = start = orig_msg = strbuf_detach(msg, &orig_msg_len);
while (s) {
const char *next;
@@ -2269,8 +2275,9 @@ static int do_pick_commit(struct repository *r,
next = parent;
next_label = msg.parent_label;
if (opts->commit_use_reference) {
- strbuf_addstr(&msgbuf,
- "# *** SAY WHY WE ARE REVERTING ON THE TITLE LINE ***");
+ strbuf_commented_addf(&msgbuf,
+ "%s",
+ "*** SAY WHY WE ARE REVERTING ON THE TITLE LINE ***");
} else if (skip_prefix(msg.subject, "Revert \"", &orig_subject) &&
/*
* We don't touch pre-existing repeated reverts, because
@@ -6082,7 +6089,8 @@ static int add_decorations_to_list(const struct commit *commit,
/* If the branch is checked out, then leave a comment instead. */
if ((path = branch_checked_out(decoration->name))) {
item->command = TODO_COMMENT;
- strbuf_commented_addf(ctx->buf, comment_line_char,
+ strbuf_commented_addf(ctx->buf,
+ comment_line_char,
"Ref %s checked out at '%s'\n",
decoration->name, path);
} else {
--
gitgitgadget
next prev parent reply other threads:[~2023-10-31 5:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 3:08 [PATCH] sequencer: remove use of comment character Tony Tung via GitGitGadget
2023-10-30 4:00 ` Junio C Hamano
2023-10-30 17:26 ` Elijah Newren
2023-10-30 23:35 ` Junio C Hamano
2023-10-31 4:42 ` Tony Tung
2023-10-31 4:50 ` Tony Tung
2023-10-31 5:33 ` Junio C Hamano
2023-10-31 6:20 ` Elijah Newren
2023-10-31 5:09 ` [PATCH v2 0/2] sequencer: remove use of hardcoded comment char Tony Tung via GitGitGadget
2023-10-31 5:09 ` [PATCH v2 1/2] sequencer: remove use of comment character Tony Tung via GitGitGadget
2023-10-31 11:43 ` Phillip Wood
2023-11-01 4:59 ` Junio C Hamano
2023-10-31 5:09 ` Tony Tung via GitGitGadget [this message]
2023-10-31 11:27 ` [PATCH v2 2/2] sequencer: fix remaining hardcoded comment char Phillip Wood
2023-10-31 6:55 ` [PATCH v2 0/2] sequencer: remove use of " Elijah Newren
2023-10-31 11:18 ` Phillip Wood
2023-11-01 0:16 ` Junio C Hamano
2023-11-01 0:21 ` Elijah Newren
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=c9f4ff34dbdb7ba221e4203bb6551b80948dc71d.1698728953.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=tonytung@merly.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.