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

Git pre-commit hook: Warning on empty staging area: Bypassing formatter due to partial commit. #223

Closed
PhilippSalvisberg opened this issue Jul 14, 2022 · 0 comments · Fixed by #224
Assignees
Labels
bug Something isn't working
Milestone

Comments

@PhilippSalvisberg
Copy link
Collaborator

When there are locally changed files, but the changes are not added to the Git Staging Area then the following is shown (locally changed file g-4210.md):

Warning: Bypassing formatter due to partial commit.
         This happens when staging some hunks/lines instead of a complete file.
On branch delete-after-test
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   g-4210.md

no changes added to commit (use "git add" and/or "git commit -a")

The pre-commit hook should detect an empty staging area and not assuming that only a partial change was made.

Thanks @kibeha for reporting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant