git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git thinks a failing command doesn't exist

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 11, 2010, 19:45 UTC
Message-ID
<AANLkTik3QmyP3sygbd36VhUQtdK-z81vqVAoAcPofFO+@mail.gmail.com>
In-Reply-To
<20100811192554.GA8106@coredump.intra.peff.net>
On Wed, Aug 11, 2010 at 19:25, Jeff King <peff@peff.net> wrote:
Show 17 quoted lines
> On Wed, Aug 11, 2010 at 07:12:38PM +0000, Ævar Arnfjörð Bjarmason wrote:
>
>> Has this been noted before:
>>
>>     $ git rebase --continue
>>     .: 986: Can't open /home/avar/g/git/.git/rebase-merge/author-script
>>     git: 'rebase' is not a git command. See 'git --help'.
>>     Did you mean this?
>>             rebase
>>
>> Rebase failed, but the help mechanism seems to just test the exit
>> code, or something similar.
>
> Which git version and which platform? There is code in run-command to
> check for an exit code of 127 (which is what posix shells should produce
> for a missing command), and to set ENOENT in that case, which is what
> execv_dashed_external notices for a missing command.

It's 1.7.2.1.295.gdf931 on Debian testing. Which is pu as it was on midnight UTC (I build it from cron) + these patches (which shouldn't matter):

    # Monkeypatches
                  git cherry-pick 041bc904d2 # t/lib-git-svn.sh: use
$PERL_PATH for perl, not perl from $PATH
    git cherry-pick 855a1f8836 # commit: fix test broken by
jn/commit-no-change-wo-status
    git revert --no-edit 48e46574e6 # rebase -i: add exec command to
launch a shell command
> So either your shell is producing that exit code for a different case,
> or git is broken.
My shell is Debian /bin/dash 0.5.5.1-6.

Unfortunately the error with rebase was some one-off thing that I couldn't reproduce. I'm not even sure /what/ I did to make it happen.

Previous: Jeff KingNext: Jeff King
Message 3 of 5 in “Git thinks a failing command doesn't exist”
  1. Ævar Arnfjörð BjarmasonAug 11, 2010
  2. Jeff KingAug 11, 2010
  3. Ævar Arnfjörð BjarmasonAug 11, 2010
  4. Jeff KingAug 11, 2010
  5. Ævar Arnfjörð BjarmasonAug 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.