gradle-git-version icon indicating copy to clipboard operation
gradle-git-version copied to clipboard

commitDistance inconsistent with 'git describe --tags'

Open raboof opened this issue 7 years ago • 1 comments

When looking at the following history:

selection_311

'git describe --tags' will show v0.1-7-g74a4d6a, while gradle-git-version's commitDistance is instead 1. This is because the history is considered with the semantics as if --first-parent were passed to git describe ().

This seems to have been intentional (#48, https://github.com/palantir/gradle-git-version/blob/develop/src/main/java/com/palantir/gradle/gitversion/JGitDescribe.java#L61, https://github.com/palantir/gradle-git-version/blob/develop/src/test/java/com/palantir/gradle/gitversion/JGitDescribeTest.java#L193), but I think it'd be great to have this more consistent with git describe --tags (or even configurable).

raboof avatar May 08 '18 12:05 raboof

See discussion in https://github.com/palantir/gradle-git-version/issues/55 about first-parent

delta003 avatar May 08 '18 14:05 delta003