git-commit-id / git-commit-id-maven-plugin

Maven plugin which includes build-time git repository information into an POJO / *.properties). Make your apps tell you which version exactly they were built from! Priceless in large distributed deployments... :-)
http://www.kto.so
GNU Lesser General Public License v3.0
1.63k stars 300 forks source link

support --first-parent option in the jgit implementation of "git describe" #224

Open helterscelter opened 9 years ago

helterscelter commented 9 years ago

the current jgit based implementation doesn't have an option to choose tags by following the --first-parent. This is supposed to allow you to skip tags which are introduced by merges into the current branch. think multi-branch repositories where master/trunk represents "production". if you merge a hotfix forward from "master" into one of your develop branches, the annotated tag from the hotfix will be picked up instead of the tag on the development line.

TheSnoozer commented 9 years ago

Hi @helterscelter thaks for reporting this here. This sounds like a great idea to go for. You got the point that it mostly needs some jgit-implementation adjustments... Ideas and PRs are very welcome :-)

TheSnoozer commented 7 years ago

see: https://stackoverflow.com/questions/33038224/how-to-call-git-show-first-parent-in-jgit

michalrrcc commented 4 years ago

When having multiple long lived branches this option would be very useful, otherwise tags need to be moved manually after every merge.