Thread (1 message) 1 message, 1 author, 2018-07-10

Re: [GSoC][PATCH v3 02/13] rebase--interactive: rewrite append_todo_help() in C

From: Junio C Hamano <hidden>
Date: 2018-07-10 18:23:05

Alban Gruin [off-list ref] writes:
This rewrites append_todo_help() from shell to C. It also incorporates
some parts of initiate_action() and complete_action() that also write
help texts to the todo file.

This also introduces the source file rebase-interactive.c. This file
will contain functions necessary for interactive rebase that are too
specific for the sequencer, and is part of libgit.a.

Two flags are added to rebase--helper.c: one to call
append_todo_help() (`--append-todo-help`), and another one to tell
append_todo_help() to write the help text suited for the edit-todo
mode (`--write-edit-todo`).

Finally, append_todo_help() is removed from git-rebase--interactive.sh
to use `rebase--helper --append-todo-help` instead.

Signed-off-by: Alban Gruin <redacted>
---
Unchanged from what have been queued on `pu` (ag/rebase-i-in-c), and
from v2.
With something like '...except downcasing an error message "Could
not append..."', a comment like this is very much appreciated as it
helps readers who have read the previous round and remember what was
in there ;-)
+ ...
+	if (get_missing_commit_check_level() == MISSING_COMMIT_CHECK_ERROR)
+		msg = _("\nDo not remove any line. Use 'drop' "
+			 "explicitly to remove a commit.\n");
+	else
+		msg = _("\nIf you remove a line here "
+			 "THAT COMMIT WILL BE LOST.\n");
+
+	strbuf_add_commented_lines(&buf, msg, strlen(msg));
Nice use of strbuf_add_comment_lines() function ;-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help