Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

useLastCommittedRevision on git returns null #237

Open
bmarwell opened this issue Feb 24, 2025 · 0 comments
Open

useLastCommittedRevision on git returns null #237

bmarwell opened this issue Feb 24, 2025 · 0 comments

Comments

@bmarwell
Copy link
Contributor

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?

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

No branches or pull requests

1 participant