Skip to content

Untracked files in source directory result in a version without SNAPSHOT suffix #176

@otopetrik

Description

@otopetrik

Creating a new file (and not adding it to git) results in a version without SNAPSHOT suffix.

uncommittedSignifier (SNAPSHOT,dirty, etc...) is not applied if the only change is the creation of new files. Without adding them to git, they are not considered uncommitted changes:

override def hasUncommittedChanges: Boolean = porcelain.status.call.hasUncommittedChanges

from hasUncommittedChanges documentation: "true if any tracked file is changed"

Running a build in a directory containing non-tracked files should result in SNAPSHOT suffix (or at least it should be configurable). The sources used for such build do not match sources committed in the repository.

jgitver-maven-plugin uses !status.isClean(), rather than hasUncommitedChanges.

isClean considers untracked files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions