git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] rebase -i: improve advice on bad instruction lines
@ 2016-09-06 18:08 Ralf Thielow
  2016-09-06 18:50 ` Ralf Thielow
  2016-09-06 18:59 ` [PATCH v2] " Ralf Thielow
  0 siblings, 2 replies; 7+ messages in thread
From: Ralf Thielow @ 2016-09-06 18:08 UTC (permalink / raw)
  To: git; +Cc: gitster, Ralf Thielow

If we found bad instruction lines in the instruction sheet
of interactive rebase, we give the user advice on how to
fix it.  However, we don't tell the user what to do afterwards.
Give the user advice to run 'git rebase --continue' after
the fix.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
 git-rebase--interactive.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index b1ba21c..029594e 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -1041,7 +1041,7 @@ The possible behaviours are: ignore, warn, error.")"
 		# placed before the commit of the next action
 		checkout_onto
 
-		warn "$(gettext "You can fix this with 'git rebase --edit-todo'.")"
+		warn "$(gettext "You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.")"
 		die "$(gettext "Or you can abort the rebase with 'git rebase --abort'.")"
 	fi
 }
-- 
2.10.0.304.gf2ff484


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] rebase -i: improve advice on bad instruction lines
  2016-09-06 18:08 [PATCH] rebase -i: improve advice on bad instruction lines Ralf Thielow
@ 2016-09-06 18:50 ` Ralf Thielow
  2016-09-06 18:59 ` [PATCH v2] " Ralf Thielow
  1 sibling, 0 replies; 7+ messages in thread
From: Ralf Thielow @ 2016-09-06 18:50 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Ralf Thielow

2016-09-06 20:08 GMT+02:00 Ralf Thielow <ralf.thielow@gmail.com>:
> -               warn "$(gettext "You can fix this with 'git rebase --edit-todo'.")"
> +               warn "$(gettext "You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.")"
>                 die "$(gettext "Or you can abort the rebase with 'git rebase --abort'.")"

Please don't apply as is. There are some test failures due to the text change.
I'll send an updated version.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] rebase -i: improve advice on bad instruction lines
  2016-09-06 18:08 [PATCH] rebase -i: improve advice on bad instruction lines Ralf Thielow
  2016-09-06 18:50 ` Ralf Thielow
@ 2016-09-06 18:59 ` Ralf Thielow
  2016-09-07  9:28   ` Dennis Kaarsemaker
  1 sibling, 1 reply; 7+ messages in thread
From: Ralf Thielow @ 2016-09-06 18:59 UTC (permalink / raw)
  To: git; +Cc: gitster, Ralf Thielow

If we found bad instruction lines in the instruction sheet
of interactive rebase, we give the user advice on how to
fix it.  However, we don't tell the user what to do afterwards.
Give the user advice to run 'git rebase --continue' after
the fix.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
Changes in v2:
- adjust tests

 git-rebase--interactive.sh    | 2 +-
 t/t3404-rebase-interactive.sh | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index b1ba21c..029594e 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -1041,7 +1041,7 @@ The possible behaviours are: ignore, warn, error.")"
 		# placed before the commit of the next action
 		checkout_onto
 
-		warn "$(gettext "You can fix this with 'git rebase --edit-todo'.")"
+		warn "$(gettext "You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.")"
 		die "$(gettext "Or you can abort the rebase with 'git rebase --abort'.")"
 	fi
 }
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 597e94e..e38e296 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -1195,7 +1195,7 @@ To avoid this message, use "drop" to explicitly remove a commit.
 Use 'git config rebase.missingCommitsCheck' to change the level of warnings.
 The possible behaviours are: ignore, warn, error.
 
-You can fix this with 'git rebase --edit-todo'.
+You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
 Or you can abort the rebase with 'git rebase --abort'.
 EOF
 
@@ -1219,7 +1219,7 @@ cat >expect <<EOF
 Warning: the command isn't recognized in the following line:
  - badcmd $(git rev-list --oneline -1 master~1)
 
-You can fix this with 'git rebase --edit-todo'.
+You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
 Or you can abort the rebase with 'git rebase --abort'.
 EOF
 
@@ -1254,7 +1254,7 @@ cat >expect <<EOF
 Warning: the SHA-1 is missing or isn't a commit in the following line:
  - edit XXXXXXX False commit
 
-You can fix this with 'git rebase --edit-todo'.
+You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
 Or you can abort the rebase with 'git rebase --abort'.
 EOF
 
-- 
2.10.0.304.gf2ff484.dirty


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] rebase -i: improve advice on bad instruction lines
  2016-09-06 18:59 ` [PATCH v2] " Ralf Thielow
@ 2016-09-07  9:28   ` Dennis Kaarsemaker
  2016-09-07 17:07     ` Ralf Thielow
  2016-09-07 18:58     ` Junio C Hamano
  0 siblings, 2 replies; 7+ messages in thread
From: Dennis Kaarsemaker @ 2016-09-07  9:28 UTC (permalink / raw)
  To: Ralf Thielow, git; +Cc: gitster

Hi Ralf,

There are quite a few patch series in flight these days around
interactive rebase. Have you checked for conflicts with those?

On di, 2016-09-06 at 20:59 +0200, Ralf Thielow wrote:
> If we found bad instruction lines in the instruction sheet
> of interactive rebase, we give the user advice on how to
> fix it.  However, we don't tell the user what to do afterwards.
> Give the user advice to run 'git rebase --continue' after
> the fix.
> 
> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
> ---
> Changes in v2:
> - adjust tests
> 
>  git-rebase--interactive.sh    | 2 +-
>  t/t3404-rebase-interactive.sh | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index b1ba21c..029594e 100644
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -1041,7 +1041,7 @@ The possible behaviours are: ignore, warn,
> error.")"
>  		# placed before the commit of the next action
>  		checkout_onto
>  
> -		warn "$(gettext "You can fix this with 'git rebase
> --edit-todo'.")"
> +		warn "$(gettext "You can fix this with 'git rebase
> --edit-todo' and then run 'git rebase --continue'.")"
>  		die "$(gettext "Or you can abort the rebase with
> 'git rebase --abort'.")"
>  	fi
>  }
> diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-
> interactive.sh
> index 597e94e..e38e296 100755
> --- a/t/t3404-rebase-interactive.sh
> +++ b/t/t3404-rebase-interactive.sh
> @@ -1195,7 +1195,7 @@ To avoid this message, use "drop" to explicitly
> remove a commit.
>  Use 'git config rebase.missingCommitsCheck' to change the level of
> warnings.
>  The possible behaviours are: ignore, warn, error.
>  
> -You can fix this with 'git rebase --edit-todo'.
> +You can fix this with 'git rebase --edit-todo' and then run 'git
> rebase --continue'.
>  Or you can abort the rebase with 'git rebase --abort'.
>  EOF
>  
> @@ -1219,7 +1219,7 @@ cat >expect <<EOF
>  Warning: the command isn't recognized in the following line:
>   - badcmd $(git rev-list --oneline -1 master~1)
>  
> -You can fix this with 'git rebase --edit-todo'.
> +You can fix this with 'git rebase --edit-todo' and then run 'git
> rebase --continue'.
>  Or you can abort the rebase with 'git rebase --abort'.
>  EOF
>  
> @@ -1254,7 +1254,7 @@ cat >expect <<EOF
>  Warning: the SHA-1 is missing or isn't a commit in the following
> line:
>   - edit XXXXXXX False commit
>  
> -You can fix this with 'git rebase --edit-todo'.
> +You can fix this with 'git rebase --edit-todo' and then run 'git
> rebase --continue'.
>  Or you can abort the rebase with 'git rebase --abort'.
>  EOF
>  

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] rebase -i: improve advice on bad instruction lines
  2016-09-07  9:28   ` Dennis Kaarsemaker
@ 2016-09-07 17:07     ` Ralf Thielow
  2016-09-09 12:21       ` Johannes Schindelin
  2016-09-07 18:58     ` Junio C Hamano
  1 sibling, 1 reply; 7+ messages in thread
From: Ralf Thielow @ 2016-09-07 17:07 UTC (permalink / raw)
  To: Dennis Kaarsemaker; +Cc: git, Junio C Hamano

2016-09-07 11:28 GMT+02:00 Dennis Kaarsemaker <dennis@kaarsemaker.net>:
> Hi Ralf,
>
> There are quite a few patch series in flight these days around
> interactive rebase. Have you checked for conflicts with those?
>

Thanks. I did not check against 'pu' when I created this patch but I'm able
to apply without any conflicts.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] rebase -i: improve advice on bad instruction lines
  2016-09-07  9:28   ` Dennis Kaarsemaker
  2016-09-07 17:07     ` Ralf Thielow
@ 2016-09-07 18:58     ` Junio C Hamano
  1 sibling, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2016-09-07 18:58 UTC (permalink / raw)
  To: Dennis Kaarsemaker; +Cc: Ralf Thielow, git

Dennis Kaarsemaker <dennis@kaarsemaker.net> writes:

> There are quite a few patch series in flight these days around
> interactive rebase. Have you checked for conflicts with those?

IIRC, Ralf's fix would need to be ported to C version, and when it
happens, it won't just be a mere conflict but will disappear from
the scripted version ;-)

But the C version is not anywhere near 'pu' yet and being rerolled,
so I do not mind queuing it on 'pu' now merely as a reminder.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] rebase -i: improve advice on bad instruction lines
  2016-09-07 17:07     ` Ralf Thielow
@ 2016-09-09 12:21       ` Johannes Schindelin
  0 siblings, 0 replies; 7+ messages in thread
From: Johannes Schindelin @ 2016-09-09 12:21 UTC (permalink / raw)
  To: Ralf Thielow; +Cc: Dennis Kaarsemaker, git, Junio C Hamano

Hi Ralf,

On Wed, 7 Sep 2016, Ralf Thielow wrote:

> 2016-09-07 11:28 GMT+02:00 Dennis Kaarsemaker <dennis@kaarsemaker.net>:
> > Hi Ralf,
> >
> > There are quite a few patch series in flight these days around
> > interactive rebase. Have you checked for conflicts with those?
> >
> 
> Thanks. I did not check against 'pu' when I created this patch but I'm able
> to apply without any conflicts.

Yeah, rewrites in C won't conflict with your patches. If you rebase
interactively, the worst that will happen is that you update code that was
moved into contrib/...

Ciao,
Johannes

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-09 12:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 18:08 [PATCH] rebase -i: improve advice on bad instruction lines Ralf Thielow
2016-09-06 18:50 ` Ralf Thielow
2016-09-06 18:59 ` [PATCH v2] " Ralf Thielow
2016-09-07  9:28   ` Dennis Kaarsemaker
2016-09-07 17:07     ` Ralf Thielow
2016-09-09 12:21       ` Johannes Schindelin
2016-09-07 18:58     ` Junio C Hamano

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).