Skip to content

[SCM-1029] Fix empty commits on JGit checkin #238

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhoffrog
Copy link

@mhoffrog mhoffrog commented Mar 31, 2025

JIRA

SCM-1029

Changes

  • JGitCheckInCommand.java:
    • in case of a includes / excludes FileSet is specified then:

      • use OR condition of
        • status.getAdded().size() > 0
        • status.getChanged().size() > 0
        • status.getRemoved() > 0

      instead of status.hasUncommittedChanges()

    • log info "nothing to commit" if nothing is to be commited

Test

  • All JUnit tests passed
  • Tested in a local application

- JGitCheckInCommand.java:
  - in case of a includes / excludes FileSet
    is specified then:
    - use OR condition of
      - status.getAdded().size() > 0
      - status.getChanged().size() > 0
      - status.getRemoved() > 0
     instead of status.hasUncommittedChanges()
  - log info "nothing to commit" if nothing
    is to be commited
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

Successfully merging this pull request may close these issues.

2 participants