Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

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

@PhilippSalvisberg

Description

@PhilippSalvisberg

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.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions