Skip to content

Commit 3701aa0

Browse files
committed
Merge branch 'ok/rebase-i-count-todo'
* ok/rebase-i-count-todo: Show number of TODO items for interactive rebase
2 parents aa9066f + 97f05f4 commit 3701aa0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

git-rebase--interactive.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,9 +1031,11 @@ test -s "$todo" || echo noop >> "$todo"
10311031
test -n "$autosquash" && rearrange_squash "$todo"
10321032
test -n "$cmd" && add_exec_commands "$todo"
10331033

1034+
todocount=$(git stripspace --strip-comments <"$todo" | wc -l)
1035+
10341036
cat >>"$todo" <<EOF
10351037
1036-
$comment_char Rebase $shortrevisions onto $shortonto
1038+
$comment_char Rebase $shortrevisions onto $shortonto ($todocount TODO item(s))
10371039
EOF
10381040
append_todo_help
10391041
git stripspace --comment-lines >>"$todo" <<\EOF

0 commit comments

Comments
 (0)