vivin / gradle-semantic-build-versioning

Gradle plugin to generate version-numbers and tags using semantic versioning
MIT License
85 stars 32 forks source link

JGit dependency causes false positive when testing for uncommited files with git LFS #76

Closed marcus-held closed 7 years ago

marcus-held commented 7 years ago

Hi,

I spend the whole week hunting a strange behavior on our build server which was caused by this plugin when it checked if the current git state had uncommited changes in VersionUtils.hasUncomittedChanges().

I didn't understand why exactly there was a false positive but I assume that the JGit library has a bug when using it together with git lfs (which we do). I come to this conclusion because all files that JGit complained about where binary files managed by git lfs.

The solution is rather simple to fix this problem by simply updating the library to 4.8.0.201706111038-r. I already did this for our project but I would like to still use your published dependency that's why I ask If you could update the library and release a new version of this plugin.

Best,

vivin commented 7 years ago

@mld-ger One problem is this version of jgit requires Java 8, which restricts use of this plugin to Java 8 and above. But Java 7 is EOL and I think google-cloud, which I found out is still using Java 7 (much to my surprise) is finally moving to Java 8. So I think it may be time to drop Java 7 support.

I will have to bump the major version if I do this and then I can document that version 3.x still works with Java 7, but won't have this jgit bugfix.

marcus-held commented 7 years ago

@vivin ah, didn't checked that actually. For us this is unfortunately a deal breaker at the moment and I would love to have this fix in your repository instead of maintaining a fork. So I would highly appreciate if you could release a new version with the fix.

vivin commented 7 years ago

@mld-ger I've merged this and this is now available in version 4.0.0.