* [PATCH] rebase -i: Fix white space in comments
@ 2018-06-26 18:02 dana
2018-06-26 21:30 ` Johannes Schindelin
0 siblings, 1 reply; 7+ messages in thread
From: dana @ 2018-06-26 18:02 UTC (permalink / raw)
To: git
Fix a trivial white-space issue introduced by commit d48f97aa8
("rebase: reindent function git_rebase__interactive", 2018-03-23). This
affected the instructional comments displayed in the editor during an
interactive rebase.
Signed-off-by: dana <dana@dana.is>
---
Sorry if i've done any of this wrong; i've never used this work-flow
before. In any case, if it's not immediately obvious, this is the issue
i mean to fix:
BEFORE (2.17.1):
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
AFTER (2.18.0):
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
#
# Note that empty commits are commented out
The 2.18.0 version is particularly irritating because many editors
highlight the trailing tab in the penultimate line as a white-space
error.
Aside: It's not a new thing, but i've always felt like that last line
should end in a full stop. Maybe i'll send a patch for that too.
Cheers,
dana
git-rebase--interactive.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 299ded213..a31af6d4c 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -222,9 +222,9 @@ $comment_char $(eval_ngettext \
EOF
append_todo_help
gettext "
- However, if you remove everything, the rebase will be aborted.
+However, if you remove everything, the rebase will be aborted.
- " | git stripspace --comment-lines >>"$todo"
+" | git stripspace --comment-lines >>"$todo"
if test -z "$keep_empty"
then
--
2.18.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] rebase -i: Fix white space in comments
2018-06-26 18:02 [PATCH] rebase -i: Fix white space in comments dana
@ 2018-06-26 21:30 ` Johannes Schindelin
2018-06-26 21:35 ` Johannes Schindelin
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Schindelin @ 2018-06-26 21:30 UTC (permalink / raw)
To: dana; +Cc: git, Wink Saville
Let's Cc: Wink, who authored the commit mentioned as culprit in the commit
message.
On Tue, 26 Jun 2018, dana wrote:
> Fix a trivial white-space issue introduced by commit d48f97aa8
> ("rebase: reindent function git_rebase__interactive", 2018-03-23). This
> affected the instructional comments displayed in the editor during an
> interactive rebase.
>
> Signed-off-by: dana <dana@dana.is>
> ---
>
> Sorry if i've done any of this wrong; i've never used this work-flow
> before. In any case, if it's not immediately obvious, this is the issue
> i mean to fix:
>
> BEFORE (2.17.1):
>
> # If you remove a line here THAT COMMIT WILL BE LOST.
> #
> # However, if you remove everything, the rebase will be aborted.
> #
> # Note that empty commits are commented out
>
> AFTER (2.18.0):
>
> # If you remove a line here THAT COMMIT WILL BE LOST.
> #
> # However, if you remove everything, the rebase will be aborted.
> #
> #
> # Note that empty commits are commented out
>
> The 2.18.0 version is particularly irritating because many editors
> highlight the trailing tab in the penultimate line as a white-space
> error.
>
> Aside: It's not a new thing, but i've always felt like that last line
> should end in a full stop. Maybe i'll send a patch for that too.
>
> Cheers,
> dana
>
> git-rebase--interactive.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index 299ded213..a31af6d4c 100644
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -222,9 +222,9 @@ $comment_char $(eval_ngettext \
> EOF
> append_todo_help
> gettext "
> - However, if you remove everything, the rebase will be aborted.
> +However, if you remove everything, the rebase will be aborted.
>
> - " | git stripspace --comment-lines >>"$todo"
> +" | git stripspace --comment-lines >>"$todo"
>
> if test -z "$keep_empty"
> then
> --
> 2.18.0
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rebase -i: Fix white space in comments
2018-06-26 21:30 ` Johannes Schindelin
@ 2018-06-26 21:35 ` Johannes Schindelin
2018-06-26 21:44 ` Johannes Schindelin
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Schindelin @ 2018-06-26 21:35 UTC (permalink / raw)
To: dana; +Cc: git, Wink Saville
Hi,
and now for the review...
On Tue, 26 Jun 2018, Johannes Schindelin wrote:
> On Tue, 26 Jun 2018, dana wrote:
>
> > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> > index 299ded213..a31af6d4c 100644
> > --- a/git-rebase--interactive.sh
> > +++ b/git-rebase--interactive.sh
> > @@ -222,9 +222,9 @@ $comment_char $(eval_ngettext \
> > EOF
> > append_todo_help
> > gettext "
> > - However, if you remove everything, the rebase will be aborted.
> > +However, if you remove everything, the rebase will be aborted.
> >
> > - " | git stripspace --comment-lines >>"$todo"
> > +" | git stripspace --comment-lines >>"$todo"
> >
> > if test -z "$keep_empty"
> > then
This does the job, and I am fine with this way of doing things, and there
seems to be a lot of precedent doing it this way e.g. in git-bisect.sh.
If my ACK is welcome, you hereby have it.
Ciao,
Johannes
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rebase -i: Fix white space in comments
2018-06-26 21:35 ` Johannes Schindelin
@ 2018-06-26 21:44 ` Johannes Schindelin
2018-06-26 21:54 ` dana
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Schindelin @ 2018-06-26 21:44 UTC (permalink / raw)
To: dana; +Cc: git, Wink Saville
Hi, me again,
On Tue, 26 Jun 2018, Johannes Schindelin wrote:
> On Tue, 26 Jun 2018, Johannes Schindelin wrote:
>
> > On Tue, 26 Jun 2018, dana wrote:
> >
> > > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> > > index 299ded213..a31af6d4c 100644
> > > --- a/git-rebase--interactive.sh
> > > +++ b/git-rebase--interactive.sh
> > > @@ -222,9 +222,9 @@ $comment_char $(eval_ngettext \
> > > EOF
> > > append_todo_help
> > > gettext "
> > > - However, if you remove everything, the rebase will be aborted.
> > > +However, if you remove everything, the rebase will be aborted.
> > >
> > > - " | git stripspace --comment-lines >>"$todo"
> > > +" | git stripspace --comment-lines >>"$todo"
> > >
> > > if test -z "$keep_empty"
> > > then
>
> This does the job, and I am fine with this way of doing things, and there
> seems to be a lot of precedent doing it this way e.g. in git-bisect.sh.
There is of course one other way to fix this, and that is by rewriting
this in C.
Which Alban has done here ;-)
http://public-inbox.org/git/20180626161643.31152-3-alban.gruin@gmail.com
Ciao,
Johannes
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rebase -i: Fix white space in comments
2018-06-26 21:44 ` Johannes Schindelin
@ 2018-06-26 21:54 ` dana
2018-06-27 10:52 ` Johannes Schindelin
0 siblings, 1 reply; 7+ messages in thread
From: dana @ 2018-06-26 21:54 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, Wink Saville
On 26 Jun 2018, at 16:44, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>There is of course one other way to fix this, and that is by rewriting
>this in C.
>
>Which Alban has done here ;-)
>
>http://public-inbox.org/git/20180626161643.31152-3-alban.gruin@gmail.com
Oh, i'm sorry, i didn't see that. That change does appear to solve the
same problem, so i'm happy to defer to it.
Thanks for looking!
dana
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rebase -i: Fix white space in comments
2018-06-26 21:54 ` dana
@ 2018-06-27 10:52 ` Johannes Schindelin
2018-06-27 18:51 ` Wink Saville
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Schindelin @ 2018-06-27 10:52 UTC (permalink / raw)
To: dana; +Cc: git, Wink Saville
Hi Dana,
On Tue, 26 Jun 2018, dana wrote:
> On 26 Jun 2018, at 16:44, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> >There is of course one other way to fix this, and that is by rewriting
> >this in C.
> >
> >Which Alban has done here ;-)
> >
> >http://public-inbox.org/git/20180626161643.31152-3-alban.gruin@gmail.com
>
> Oh, i'm sorry, i didn't see that.
No need to be sorry, nobody expects you to read the "firehose" that is the
Git mailing list in its entirety.
> That change does appear to solve the same problem, so i'm happy to defer
> to it.
Thank you for confirming that it also fixes your issue, that is very
helpful!
Ciao,
Johannes
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rebase -i: Fix white space in comments
2018-06-27 10:52 ` Johannes Schindelin
@ 2018-06-27 18:51 ` Wink Saville
0 siblings, 0 replies; 7+ messages in thread
From: Wink Saville @ 2018-06-27 18:51 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: dana, Git List
Sorry for the whitespace bug, it looks like everything is under
control one way or the other.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-06-27 18:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 18:02 [PATCH] rebase -i: Fix white space in comments dana
2018-06-26 21:30 ` Johannes Schindelin
2018-06-26 21:35 ` Johannes Schindelin
2018-06-26 21:44 ` Johannes Schindelin
2018-06-26 21:54 ` dana
2018-06-27 10:52 ` Johannes Schindelin
2018-06-27 18:51 ` Wink Saville
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).