* [PATCH] rebase-i: print abbreviated hash when stop for editing
@ 2016-03-24 18:31 Ralf Thielow
2016-03-24 19:56 ` Junio C Hamano
2016-03-28 16:00 ` [PATCH v2] rebase-i: print an " Ralf Thielow
0 siblings, 2 replies; 5+ messages in thread
From: Ralf Thielow @ 2016-03-24 18:31 UTC (permalink / raw)
To: git; +Cc: Ralf Thielow
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
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)
--
2.8.0.rc4.7.g35d7ca9.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] rebase-i: print abbreviated hash when stop for editing
2016-03-24 18:31 [PATCH] rebase-i: print abbreviated hash when stop for editing Ralf Thielow
@ 2016-03-24 19:56 ` Junio C Hamano
2016-03-24 21:06 ` Ralf Thielow
2016-03-28 16:00 ` [PATCH v2] rebase-i: print an " Ralf Thielow
1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2016-03-24 19:56 UTC (permalink / raw)
To: Ralf Thielow; +Cc: git
Ralf Thielow <ralf.thielow@gmail.com> writes:
> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
> ---
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)?
> 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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rebase-i: print abbreviated hash when stop for editing
2016-03-24 19:56 ` Junio C Hamano
@ 2016-03-24 21:06 ` Ralf Thielow
0 siblings, 0 replies; 5+ messages in thread
From: Ralf Thielow @ 2016-03-24 21:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
2016-03-24 20:56 GMT+01:00 Junio C Hamano <gitster@pobox.com>:
> Ralf Thielow <ralf.thielow@gmail.com> writes:
>
>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
>> ---
>
> 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.
>
>> 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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] rebase-i: print an abbreviated hash when stop for editing
2016-03-24 18:31 [PATCH] rebase-i: print abbreviated hash when stop for editing Ralf Thielow
2016-03-24 19:56 ` Junio C Hamano
@ 2016-03-28 16:00 ` Ralf Thielow
2016-03-28 18:43 ` Junio C Hamano
1 sibling, 1 reply; 5+ messages in thread
From: Ralf Thielow @ 2016-03-28 16:00 UTC (permalink / raw)
To: git; +Cc: gitster, Ralf Thielow
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>
---
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)
--
2.8.0.rc4.285.gc3ac548
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] rebase-i: print an abbreviated hash when stop for editing
2016-03-28 16:00 ` [PATCH v2] rebase-i: print an " Ralf Thielow
@ 2016-03-28 18:43 ` Junio C Hamano
0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2016-03-28 18:43 UTC (permalink / raw)
To: Ralf Thielow; +Cc: git
Ralf Thielow <ralf.thielow@gmail.com> writes:
> 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>
> ---
Thanks, will queue.
> 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)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-28 18:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-24 18:31 [PATCH] rebase-i: print abbreviated hash when stop for editing Ralf Thielow
2016-03-24 19:56 ` Junio C Hamano
2016-03-24 21:06 ` Ralf Thielow
2016-03-28 16:00 ` [PATCH v2] rebase-i: print an " Ralf Thielow
2016-03-28 18:43 ` Junio C Hamano
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).