Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-07-06 21:54:46 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-06 21:54:46 +0300
commit67e7305e64fea8d15879e9dc3831fc8e31cfe619 (patch)
treed8ed9ee0a2b54f3df4619af5757d938bb5247986 /add-patch.c
parentda269af9207e38e820daad8aa993caa7d2fad76c (diff)
parent787cb8a48ae24ff07fa7c763909bb204bfdc84a7 (diff)
Merge branch 'cw/strbuf-cleanup'
Move functions that are not about pure string manipulation out of strbuf.[ch] * cw/strbuf-cleanup: strbuf: remove global variable path: move related function to path object-name: move related functions to object-name credential-store: move related functions to credential-store file abspath: move related functions to abspath strbuf: clarify dependency strbuf: clarify API boundary
Diffstat (limited to 'add-patch.c')
-rw-r--r--add-patch.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/add-patch.c b/add-patch.c
index 53e3248295..ba629add62 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1107,10 +1107,11 @@ static int edit_hunk_manually(struct add_p_state *s, struct hunk *hunk)
size_t i;
strbuf_reset(&s->buf);
- strbuf_commented_addf(&s->buf, _("Manual hunk edit mode -- see bottom for "
- "a quick guide.\n"));
+ strbuf_commented_addf(&s->buf, comment_line_char,
+ _("Manual hunk edit mode -- see bottom for "
+ "a quick guide.\n"));
render_hunk(s, hunk, 0, 0, &s->buf);
- strbuf_commented_addf(&s->buf,
+ strbuf_commented_addf(&s->buf, comment_line_char,
_("---\n"
"To remove '%c' lines, make them ' ' lines "
"(context).\n"
@@ -1119,12 +1120,13 @@ static int edit_hunk_manually(struct add_p_state *s, struct hunk *hunk)
s->mode->is_reverse ? '+' : '-',
s->mode->is_reverse ? '-' : '+',
comment_line_char);
- strbuf_commented_addf(&s->buf, "%s", _(s->mode->edit_hunk_hint));
+ strbuf_commented_addf(&s->buf, comment_line_char, "%s",
+ _(s->mode->edit_hunk_hint));
/*
* TRANSLATORS: 'it' refers to the patch mentioned in the previous
* messages.
*/
- strbuf_commented_addf(&s->buf,
+ strbuf_commented_addf(&s->buf, comment_line_char,
_("If it does not apply cleanly, you will be "
"given an opportunity to\n"
"edit again. If all lines of the hunk are "