Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit hook failed if I commit after merge without auto-commit #1302

Open
VoitykRoman opened this issue Jun 21, 2023 · 2 comments
Open

Comments

@VoitykRoman
Copy link

VoitykRoman commented Jun 21, 2023

Description

I want to merge my main branch into a feature branch. If I use auto-commit during merge it works fine.
But without auto-commit files are marked as staged and lint-staged failed due to git error. but with lint-staged --debug it works

Steps to reproduce

merge a branch into your without auto-commit
git commit -m "message" --no-commit --no-ff
after the pre-commit hook is triggered lint-staged failed due to git error (lint-staged on staged files without commit works fine)

Debug Logs

if I run with --debug commit succeded. Looks strange

If auto-commit it works fine (looks like the hook is not triggered) but only if I commit merged changes git error occurred

Environment

  • OS: Windows 11
  • Node.js: v16.17.1
  • lint-staged: ^13.2.2
@VoitykRoman
Copy link
Author

image

@VoitykRoman
Copy link
Author

image
success with --debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant