Re: [PATCH] rebase -i: fix misleading error message after 'exec no-such' instruction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:

> Am 9/18/2012 13:20, schrieb Matthieu Moy:
>> Johannes Sixt <j.sixt@xxxxxxxxxxxxx> writes:
>> 
>>> From: Johannes Sixt <j6t@xxxxxxxx>
>>>
>>> When the todo sheet of interactive rebase instructs to run a non-existing
>>> command, the operation stops with the following error:
>>>
>>>   Execution failed: no-such
>>>   You can fix the problem, and then run
>>>
>>>           git rebase --continue
>>>
>>>   fatal: 'rebase' appears to be a git command, but we were not
>>>   able to execute it. Maybe git-rebase is broken?
>> 
>> While you're there, maybe you want to turn the first line into
>> 
>> Execution failed: no-such (command not found)
>
> No, I don't want to: Neither do we have errno here, nor can we be specific
> enough because the whole shell script the user gave after 'exec' is
> repeated here.
>
> I would rather remove the line so that it does not distract from the more
> specific error message that the shell gave. On top of that, the command is
> already dumped before it is executed; we don't need to repeat it.

Not sure what you mean: remove the line in case $status = 127, or remove
it anyway.

If you mean only when $status = 127, then that is indeed a good idea, as
the full error message looks like

  Executing: nosuchcommand
  zsh:1: command not found: nosuchcommand
  Execution failed: nosuchcommand
  You can fix the problem, and then run [...]

So, yes, the shell's error message is enough and more precise than we
could do in git rebase.

If you mean remove it in any case, I disagree: repeating the command is
usually not very useful, but may help when the command itself produced a
lot of output (e.g. "exec make test" oftens fills-in your terminal's
buffer). And the information that the command fails can be important if
the command failed silently, e.g. with "exec false":

  Executing: false
  Execution failed: false
  You can fix the problem, and then run [...]

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]