# [PATCH] rebase interactive: Add hint how to continue after 'Unknown command' error

4 messages from 2008-01-06 to 2008-01-06. Participants: Steffen Prohaska, Wincent Colaiuta, David Brown, Junio C Hamano.
Thread: https://gitlist.dev/t/11497

## Steffen Prohaska, 2008-01-06 15:46

Subject: [PATCH] rebase interactive: Add hint how to continue after 'Unknown command' error
Message-ID: <1199634385511-git-send-email-prohaska@zib.de>
URL: https://gitlist.dev/e/1199634385511-git-send-email-prohaska%40zib.de

```
rebase interactive asks the user to fix unknown commands but it did not
tell how to continue.

This commits adds a hint how to continue.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---
 git-rebase--interactive.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index acdcc54..d4bd811 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -310,7 +310,7 @@ do_next () {
 		;;
 	*)
 		warn "Unknown command: $command $sha1 $rest"
-		die_with_patch $sha1 "Please fix this in the file $TODO."
+		die_with_patch $sha1 "Please fix this in the file $TODO. And run 'git rebase --continue'."
 		;;
 	esac
 	test -s "$TODO" && return
-- 
1.5.4.rc2.26.g1deb

```

## Wincent Colaiuta, 2008-01-06 17:33

Subject: Re: [PATCH] rebase interactive: Add hint how to continue after 'Unknown command' error
Message-ID: <5F80ADF7-A68A-4DF3-8453-92B76BC927EF@wincent.com>
URL: https://gitlist.dev/e/5F80ADF7-A68A-4DF3-8453-92B76BC927EF%40wincent.com
In-Reply-To: <1199634385511-git-send-email-prohaska@zib.de>

```
El 6/1/2008, a las 16:46, Steffen Prohaska escribió:

> @@ -310,7 +310,7 @@ do_next () {
> 		;;
> 	*)
> 		warn "Unknown command: $command $sha1 $rest"
> -		die_with_patch $sha1 "Please fix this in the file $TODO."
> +		die_with_patch $sha1 "Please fix this in the file $TODO. And run  
> 'git rebase --continue'."

Grammar nit: sentences can't start with "And", so that should really be:

"Please fix this in the file $TODO and run 'git rebase --continue'."

Cheers,
Wincent

```

## David Brown, 2008-01-06 19:50

Subject: Re: [PATCH] rebase interactive: Add hint how to continue after 'Unknown command' error
Message-ID: <20080106195044.GA24169@old.davidb.org>
URL: https://gitlist.dev/e/20080106195044.GA24169%40old.davidb.org
In-Reply-To: <5F80ADF7-A68A-4DF3-8453-92B76BC927EF@wincent.com>

```
On Sun, Jan 06, 2008 at 06:33:32PM +0100, Wincent Colaiuta wrote:
>El 6/1/2008, a las 16:46, Steffen Prohaska escribió:
>
>> @@ -310,7 +310,7 @@ do_next () {
>> 		;;
>> 	*)
>> 		warn "Unknown command: $command $sha1 $rest"
>> -		die_with_patch $sha1 "Please fix this in the file $TODO."
>> +		die_with_patch $sha1 "Please fix this in the file $TODO. And run  
>> 'git rebase --continue'."
>
>Grammar nit: sentences can't start with "And", so that should really be:

Not true:
<http://www.accu-assist.com/grammar-tips-archive/11-07-06_GrammarTip_and-but-conjunctions.htm>

Although, in this case, I would agree that it should just be one sentence
with a comma.  It's more of a stylistic construct, more common in fiction
than technical documentation.

Dave

```

## Junio C Hamano, 2008-01-06 20:14

Subject: Re: [PATCH] rebase interactive: Add hint how to continue after 'Unknown command' error
Message-ID: <7vtzlq4soy.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vtzlq4soy.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20080106195044.GA24169@old.davidb.org>

```
David Brown <git@davidb.org> writes:

> On Sun, Jan 06, 2008 at 06:33:32PM +0100, Wincent Colaiuta wrote:
>>El 6/1/2008, a las 16:46, Steffen Prohaska escribió:
>>
>>> @@ -310,7 +310,7 @@ do_next () {
>>> 		;;
>>> 	*)
>>> 		warn "Unknown command: $command $sha1 $rest"
>>> -		die_with_patch $sha1 "Please fix this in the file $TODO."
>>> +		die_with_patch $sha1 "Please fix this in the file
>>> $TODO. And run  'git rebase --continue'."
>>
>>Grammar nit: sentences can't start with "And", so that should really be:
>
> Not true:
> <http://www.accu-assist.com/grammar-tips-archive/11-07-06_GrammarTip_and-but-conjunctions.htm>
>
> Although, in this case, I would agree that it should just be one sentence
> with a comma.  It's more of a stylistic construct, more common in fiction
> than technical documentation.

I've always wondered why this part can't just re-launch the
editor with the $TODO file, have the instruction to "fix" in the
file for the user to see (together with the original "#
commented out" instructions), and do the --continue itself.

```
