{"thread":{"id":"24708","subject":"Git thinks a failing command doesn't exist","startedAt":"2010-08-11T19:12:38Z","lastAt":"2010-08-11T20:10:23Z","messageCount":5,"participants":["Ævar Arnfjörð Bjarmason","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"147818","messageId":"AANLkTin7E-v9TYd1KoD73knnSwSMy-V-pvS0TmpQd72M@mail.gmail.com","threadId":"24708","inReplyTo":null,"subject":"Git thinks a failing command doesn't exist","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-11T19:12:38Z","receivedAt":"2010-08-11T19:12:38Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Has this been noted before:\n\n    $ git rebase --continue\n    .: 986: Can't open /home/avar/g/git/.git/rebase-merge/author-script\n    git: 'rebase' is not a git command. See 'git --help'.\n    Did you mean this?\n            rebase\n\nRebase failed, but the help mechanism seems to just test the exit\ncode, or something similar.\n\nPerhaps help_unknown_cmd could just check if the command it's\nsuggesting == what it says doesn't exist, if so the command probably\nfailed, but maybe there's a better solution.\n"},{"id":"147819","messageId":"20100811192554.GA8106@coredump.intra.peff.net","threadId":"24708","inReplyTo":"AANLkTin7E-v9TYd1KoD73knnSwSMy-V-pvS0TmpQd72M@mail.gmail.com","subject":"Re: Git thinks a failing command doesn't exist","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-08-11T19:25:55Z","receivedAt":"2010-08-11T19:25:55Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Aug 11, 2010 at 07:12:38PM +0000, Ævar Arnfjörð Bjarmason wrote:\n\n> Has this been noted before:\n> \n>     $ git rebase --continue\n>     .: 986: Can't open /home/avar/g/git/.git/rebase-merge/author-script\n>     git: 'rebase' is not a git command. See 'git --help'.\n>     Did you mean this?\n>             rebase\n> \n> Rebase failed, but the help mechanism seems to just test the exit\n> code, or something similar.\n\nWhich git version and which platform? There is code in run-command to\ncheck for an exit code of 127 (which is what posix shells should produce\nfor a missing command), and to set ENOENT in that case, which is what\nexecv_dashed_external notices for a missing command.\n\nSo either your shell is producing that exit code for a different case,\nor git is broken.\n\n-Peff\n"},{"id":"147823","messageId":"AANLkTik3QmyP3sygbd36VhUQtdK-z81vqVAoAcPofFO+@mail.gmail.com","threadId":"24708","inReplyTo":"20100811192554.GA8106@coredump.intra.peff.net","subject":"Re: Git thinks a failing command doesn't exist","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-11T19:45:14Z","receivedAt":"2010-08-11T19:45:14Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Aug 11, 2010 at 19:25, Jeff King <peff@peff.net> wrote:\n> On Wed, Aug 11, 2010 at 07:12:38PM +0000, Ævar Arnfjörð Bjarmason wrote:\n>\n>> Has this been noted before:\n>>\n>>     $ git rebase --continue\n>>     .: 986: Can't open /home/avar/g/git/.git/rebase-merge/author-script\n>>     git: 'rebase' is not a git command. See 'git --help'.\n>>     Did you mean this?\n>>             rebase\n>>\n>> Rebase failed, but the help mechanism seems to just test the exit\n>> code, or something similar.\n>\n> Which git version and which platform? There is code in run-command to\n> check for an exit code of 127 (which is what posix shells should produce\n> for a missing command), and to set ENOENT in that case, which is what\n> execv_dashed_external notices for a missing command.\n\nIt's 1.7.2.1.295.gdf931 on Debian testing. Which is pu as it was on\nmidnight UTC (I build it from cron) + these patches (which shouldn't\nmatter):\n\n    # Monkeypatches\n\n                  git cherry-pick 041bc904d2 # t/lib-git-svn.sh: use\n$PERL_PATH for perl, not perl from $PATH\n    git cherry-pick 855a1f8836 # commit: fix test broken by\njn/commit-no-change-wo-status\n    git revert --no-edit 48e46574e6 # rebase -i: add exec command to\nlaunch a shell command\n\n> So either your shell is producing that exit code for a different case,\n> or git is broken.\n\nMy shell is Debian /bin/dash 0.5.5.1-6.\n\nUnfortunately the error with rebase was some one-off thing that I\ncouldn't reproduce. I'm not even sure /what/ I did to make it happen.\n"},{"id":"147824","messageId":"20100811194841.GA8689@coredump.intra.peff.net","threadId":"24708","inReplyTo":"AANLkTik3QmyP3sygbd36VhUQtdK-z81vqVAoAcPofFO+@mail.gmail.com","subject":"Re: Git thinks a failing command doesn't exist","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-08-11T19:48:41Z","receivedAt":"2010-08-11T19:48:41Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Aug 11, 2010 at 07:45:14PM +0000, Ævar Arnfjörð Bjarmason wrote:\n\n> > So either your shell is producing that exit code for a different case,\n> > or git is broken.\n> \n> My shell is Debian /bin/dash 0.5.5.1-6.\n\nHmm, I can't reproduce here, and I am also using dash as my shell.\n\n> Unfortunately the error with rebase was some one-off thing that I\n> couldn't reproduce. I'm not even sure /what/ I did to make it happen.\n\nOK. The code is _supposed_ to work as you expected, so if it happens\nagain, I guess try to reproduce and we'll go from there.\n\n-Peff\n"},{"id":"147828","messageId":"AANLkTi=78rrF5aK0ku27haLhDp6a=W86EGc_RihdaHVW@mail.gmail.com","threadId":"24708","inReplyTo":"20100811194841.GA8689@coredump.intra.peff.net","subject":"Re: Git thinks a failing command doesn't exist","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-11T20:10:23Z","receivedAt":"2010-08-11T20:10:23Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Aug 11, 2010 at 19:48, Jeff King <peff@peff.net> wrote:\n> On Wed, Aug 11, 2010 at 07:45:14PM +0000, Ævar Arnfjörð Bjarmason wrote:\n>\n>> > So either your shell is producing that exit code for a different case,\n>> > or git is broken.\n>>\n>> My shell is Debian /bin/dash 0.5.5.1-6.\n>\n> Hmm, I can't reproduce here, and I am also using dash as my shell.\n>\n>> Unfortunately the error with rebase was some one-off thing that I\n>> couldn't reproduce. I'm not even sure /what/ I did to make it happen.\n>\n> OK. The code is _supposed_ to work as you expected, so if it happens\n> again, I guess try to reproduce and we'll go from there.\n\ngit-rebase must have exited with a code of 127. I tried every exit\ncode from 1 to 255, and 127 is the only one that does this:\n\n$ head -n2 git-rebase\n#!/bin/sh\nexit 127\n\n$ ./git rebase --continue\ngit: 'rebase' is not a git command. See 'git --help'.\n\nDid you mean this?\n        rebase\n"}]}