git-rebase--interactive needs a better message
- From
Dmitry Potapov <dpotapov@gmail.com>
- Date
- Sep 23, 2007, 22:45 UTC
- Message-ID
- <20070923224502.GB7249@potapov>
I have tried to use git-rebase --interactive today, and run into a strange error message saying:
/usr/bin/git-rebase--interactive: line 333: $GIT_DIR/.dotest-merge/author-script: No such file or directory
I had to scratch my head for a while before I realized that I forgot to say git-commit. So, it was mine mistake, but I think that it should be possible to have a better error message suggesting the user what to do. I have looked at the git-rebase--interactive script, but I am not sure that I understand it good enough to propose a patch.
To reproduce the problem, run the following script in an empty directory: === #!/bin/sh set -e
git-init echo 'version 1' > foo git-add foo git-commit -m 'commit 1' foo echo 'versionn 2' >> foo git-commit -m 'commit 2' foo echo 'version 3' >> foo git-commit -m 'commit 3' foo
GIT_EDITOR='sed -i -e "/commit 2/{s/^pick/edit/}"' git-rebase -i HEAD~2 sed -i -e "s/versionn/version/" foo git-update-index foo # Missing git-commit --amend git-rebase --continue ===
Error message: == /usr/bin/git-rebase--interactive: line 333: /tmp/zzz/.git/.dotest-merge/author-script: No such file or directory ===
I use git version 1.5.3.1
Dmitry Potapov