diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-07-06 11:54:46 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-07-06 11:54:46 -0700 |
| commit | 67e7305e64fea8d15879e9dc3831fc8e31cfe619 (patch) | |
| tree | d8ed9ee0a2b54f3df4619af5757d938bb5247986 /rebase-interactive.c | |
| parent | Merge branch 'rs/strbuf-expand-step' (diff) | |
| parent | strbuf: remove global variable (diff) | |
| download | git-67e7305e64fea8d15879e9dc3831fc8e31cfe619.tar.gz git-67e7305e64fea8d15879e9dc3831fc8e31cfe619.zip | |
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 'rebase-interactive.c')
| -rw-r--r-- | rebase-interactive.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/rebase-interactive.c b/rebase-interactive.c index 852a331318..f286404d4b 100644 --- a/rebase-interactive.c +++ b/rebase-interactive.c @@ -72,13 +72,14 @@ void append_todo_help(int command_count, if (!edit_todo) { strbuf_addch(buf, '\n'); - strbuf_commented_addf(buf, Q_("Rebase %s onto %s (%d command)", - "Rebase %s onto %s (%d commands)", - command_count), + strbuf_commented_addf(buf, comment_line_char, + Q_("Rebase %s onto %s (%d command)", + "Rebase %s onto %s (%d commands)", + command_count), shortrevisions, shortonto, command_count); } - strbuf_add_commented_lines(buf, msg, strlen(msg)); + strbuf_add_commented_lines(buf, msg, strlen(msg), comment_line_char); if (get_missing_commit_check_level() == MISSING_COMMIT_CHECK_ERROR) msg = _("\nDo not remove any line. Use 'drop' " @@ -87,7 +88,7 @@ void append_todo_help(int command_count, msg = _("\nIf you remove a line here " "THAT COMMIT WILL BE LOST.\n"); - strbuf_add_commented_lines(buf, msg, strlen(msg)); + strbuf_add_commented_lines(buf, msg, strlen(msg), comment_line_char); if (edit_todo) msg = _("\nYou are editing the todo file " @@ -98,7 +99,7 @@ void append_todo_help(int command_count, msg = _("\nHowever, if you remove everything, " "the rebase will be aborted.\n\n"); - strbuf_add_commented_lines(buf, msg, strlen(msg)); + strbuf_add_commented_lines(buf, msg, strlen(msg), comment_line_char); } int edit_todo_list(struct repository *r, struct todo_list *todo_list, @@ -130,7 +131,7 @@ int edit_todo_list(struct repository *r, struct todo_list *todo_list, if (launch_sequence_editor(todo_file, &new_todo->buf, NULL)) return -2; - strbuf_stripspace(&new_todo->buf, 1); + strbuf_stripspace(&new_todo->buf, comment_line_char); if (initial && new_todo->buf.len == 0) return -3; |
