aboutsummaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorRalf Thielow <ralf.thielow@gmail.com>2016-03-28 18:00:00 +0200
committerJunio C Hamano <gitster@pobox.com>2016-03-28 10:49:40 -0700
commit14c793e8f409216b868223236fc54e5e5f86aa3a (patch)
tree494ae358fe0dc71b6fccf088c9818212ed73769b /git-rebase--interactive.sh
parente46579643d56162299b1756b70d418005351b256 (diff)
downloadgit-14c793e8f409216b868223236fc54e5e5f86aa3a.tar.gz
git-14c793e8f409216b868223236fc54e5e5f86aa3a.tar.xz
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 <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index b938a6d4a..e98866e2a 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -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)