rebase-i: print an abbreviated hash when stop for editing
authorRalf Thielow <ralf.thielow@gmail.com>
Mon, 28 Mar 2016 16:00:00 +0000 (18:00 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Mar 2016 17:49:40 +0000 (10:49 -0700)
The message that is shown when rebase-i stops for editing prints
the full hash of the commit where it stopped which makes the message
overflow to the next line on smaller terminal windows. Print an
abbreviated hash instead.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh
index b938a6d4aa86b5f1e75312188c71cc4b0cdaab23..e98866e2a8cc0052f9b6d5a6a7290d46c7a28e45 100644 (file)
@@ -552,7 +552,8 @@ do_next () {
 
                mark_action_done
                do_pick $sha1 "$rest"
-               warn "Stopped at $sha1... $rest"
+               sha1_abbrev=$(git rev-parse --short $sha1)
+               warn "Stopped at $sha1_abbrev... $rest"
                exit_with_patch $sha1 0
                ;;
        squash|s|fixup|f)