Re: [PATCH] rebase-i: print abbreviated hash when stop for editing

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] rebase-i: print abbreviated hash when stop for editing

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:08:56

Ralf Thielow [off-list ref] writes:
Signed-off-by: Ralf Thielow <redacted>
---
Hmph, the reason why this is a good thing to do is because an
overlong $sha1 would push $rest too far to the right (possibly
making it overflow to the next line)?

quoted hunk
 git-rebase--interactive.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 4cde685..9ea3075 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -548,7 +548,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)

Re: [PATCH] rebase-i: print abbreviated hash when stop for editing

From: Ralf Thielow <hidden>
Date: 2016-06-15 23:08:56

2016-03-24 20:56 GMT+01:00 Junio C Hamano [off-list ref]:
Ralf Thielow [off-list ref] writes:
quoted
Signed-off-by: Ralf Thielow <redacted>
---
Hmph, the reason why this is a good thing to do is because an
overlong $sha1 would push $rest too far to the right (possibly
making it overflow to the next line)?
Yes.  Another solution would have been to remove the "..." at the
end, but I prefer to see a shorter message rather than having
the full sha1 for whatever reason.
quoted
 git-rebase--interactive.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 4cde685..9ea3075 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -548,7 +548,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)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help