Skip to content

useLastCommittedRevision on git returns null #237

@bmarwell

Description

@bmarwell

When setting useLastCommittedRevision, git repos will return null.
If I am not mistaken, in git there is nothing but a last committed revision (i.e. no revision for current workspace).

The code says:

https://github.com/mojohaus/buildnumber-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/build/AbstractScmMojo.java#L272-L293

        if (useLastCommittedRevision) {
            // It seemed the case that for git getLastChangedRevision()
            // returns null instead of the last revision in contradiction
            // to the above code: scmResult.getInfoItems().get(0);

Maybe it should either

  • throw an error
  • fetch the last version of the repo

Description is:

whether to retrieve the revision for the last commit, or the last revision of the repository.

So maybe it is in combination with doCheck = false // doUpdate = false?

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