git-code-format-maven-plugin
git-code-format-maven-plugin copied to clipboard
Plugin can produce empty commits and committed files show up as modified in git status
What steps will reproduce the problem?
- Make changes to a file's formatting which conflict with google-code-formatter.
- Commit the changes.
Expected
- There should be no commit as there are no changes after the formatter fixed the files in the pre-commit hook.
git statusshould report a clean state.
Actual
- An empty commit was produced.
git statusreports the file as modified,git diffreports no changes, however.
The part with the modified files without changes showing up also happens after a "real" commit. git add . cleans it up again.
Environment: git-code-format-maven-plugin 4.2 Apache Maven 3.8.6 Java version: 11.0.14 (Red Hat) Windows 10 git version 2.38.0.windows.1