mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
Show number of TODO items for interactive rebase
During 'rebase -i', one wrong edit in a long rebase session might inadvertently drop commits/items. This change shows the total number of TODO items in the comments after the list. After performing the rebase edit, total item counts can be compared to make sure that no changes have been lost in the edit. Signed-off-by: Onno Kortmann <onno@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c18b867341
commit
97f05f43dc
|
@ -1031,9 +1031,11 @@ test -s "$todo" || echo noop >> "$todo"
|
|||
test -n "$autosquash" && rearrange_squash "$todo"
|
||||
test -n "$cmd" && add_exec_commands "$todo"
|
||||
|
||||
todocount=$(git stripspace --strip-comments <"$todo" | wc -l)
|
||||
|
||||
cat >>"$todo" <<EOF
|
||||
|
||||
$comment_char Rebase $shortrevisions onto $shortonto
|
||||
$comment_char Rebase $shortrevisions onto $shortonto ($todocount TODO item(s))
|
||||
EOF
|
||||
append_todo_help
|
||||
git stripspace --comment-lines >>"$todo" <<\EOF
|
||||
|
|
Loading…
Reference in a new issue