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

Plugin can produce empty commits and committed files show up as modified in git status #96

Open
pfeileon opened this issue Jan 13, 2023 · 2 comments

Comments

@pfeileon
Copy link

What steps will reproduce the problem?

  1. Make changes to a file's formatting which conflict with google-code-formatter.
  2. 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 status should report a clean state.

Actual

  • An empty commit was produced.
  • git status reports the file as modified, git diff reports 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

@mjuergens-cg
Copy link

See #227

@RafaelMRG
Copy link

Anyone managed to fix this issue ? i am pretty much running almost the same setup as described and get the same git behavior

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

No branches or pull requests

3 participants