Skip to content

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

@pfeileon

Description

@pfeileon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions