Skip to content

Commit 14c793e

Browse files
ralfthgitster
authored andcommitted
rebase-i: print an abbreviated hash when stop for editing
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e465796 commit 14c793e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-rebase--interactive.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,8 @@ do_next () {
552552

553553
mark_action_done
554554
do_pick $sha1 "$rest"
555-
warn "Stopped at $sha1... $rest"
555+
sha1_abbrev=$(git rev-parse --short $sha1)
556+
warn "Stopped at $sha1_abbrev... $rest"
556557
exit_with_patch $sha1 0
557558
;;
558559
squash|s|fixup|f)

0 commit comments

Comments
 (0)