git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Show number of commits being rebased interactively
@ 2014-11-09 13:24 Onno Kortmann
  0 siblings, 0 replies; 6+ messages in thread
From: Onno Kortmann @ 2014-11-09 13:24 UTC (permalink / raw)
  To: git

During 'rebase -i', a wrong edit command might inadvertently drop
commits. This change shows the total number of commits in the comments below
the commit list. After a rebase edit, this number can be quickly compared to
the line number of the last commit in the rebase TODO list.

Signed-off-by: Onno Kortmann <onno@gmx.net>
---
 git-rebase--interactive.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index b64dd28..b266dc0 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -1031,9 +1031,11 @@ test -s "$todo" || echo noop >> "$todo"
 test -n "$autosquash" && rearrange_squash "$todo"
 test -n "$cmd" && add_exec_commands "$todo"
 +commitcount=$(git stripspace --strip-comments <"$todo"  | wc -l)
+
 cat >>"$todo" <<EOF
 -$comment_char Rebase $shortrevisions onto $shortonto
+$comment_char Rebase $shortrevisions onto $shortonto ($commitcount commit(s))
 EOF
 append_todo_help
 git stripspace --comment-lines >>"$todo" <<\EOF
-- 
2.2.0.rc1.1.gbab0d06

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-10 18:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <md5:H/n6RCGs7zvP8Sp7z7ElnQ==>
2014-11-10 16:32 ` [PATCH] Show number of commits being rebased interactively Onno Kortmann
2014-12-05 21:37   ` Junio C Hamano
2014-12-07 20:56     ` Onno Kortmann
2014-12-09 19:03       ` Junio C Hamano
2014-12-10 18:16         ` Onno Kortmann
2014-11-09 13:24 Onno Kortmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).