ajoberstar / gradle-git

Git plugin for Gradle
Apache License 2.0
563 stars 89 forks source link

Uninitialized submodule handled like uncomitted change #188

Closed shradej1 closed 8 years ago

shradej1 commented 8 years ago

I'm not sure if this is intentional or not, but an uninitialized git submodule is treated by gradle-git / release-opinion as an uncommitted change. Final strategy gets skipped because "repo is dirty", and dev strategies append "uncomitted" to the version name.

This conflicts with the behavior of "git describe" which does not indicate a dirty repository when an uninitialized submodule exists.

ajoberstar commented 8 years ago

The intention isn't to necessarily behave similar to git describe that's just an analogous use of tags for versioning purposes. Submodules have been problematic due to lack of support in JGit (which Grgit wraps, which gradle-git uses). Here's a couple potentially relevant things being tracked on the Grgit side that are ultimately waiting on JGit changes: ajoberstar/grgit#60 and ajoberstar/grgit#80.

I'll close this as a duplicate of those, but reopen if that doesn't seem accurate (or open an alternative Grgit issue if those 2 don't seem to cover it).