Unexpected error when running commit checker.
See original GitHub issueWhat version are you using?
2.1.0
What did you do?
Added a commit, then checked out a new branch (for renaming purposes). Rebased from upstream. Ran npm run check-commit
What happened?
Got an error saying More than one commit found, please squash.
What did you expect to happen?
Since I only added one commit, I didn’t expect to see this message. My local master wasn’t up to date. Reading the checkGitCommit
function, I realized thats where the disparity was,. Solution was to delete my local master, so that this check ran instead
https://github.com/eslint/eslint/blob/ec803b268ade7b9093ac127083ca69c2ad7a2b47/Makefile.js#L871
I think this check assumes local master is up to date, which isn’t always true imo (since one can rebase later, etc). Instead I think the check should run against upstream/master
.
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (8 by maintainers)
We don’t actually require commits to be squashed anymore, so maybe we should just remove that check.
Just a heads up: I’ve just had the misfortune to encounter this very same problem while I was committing for my latest pull request.