Open jkylling opened 11 months ago
Hello, thanks for the bug ticket. Since you seem to have fixed the issue: Could you create a MR? Thanks!
Ping?
Sorry, I don't have a fix for the issue, besides aligning the defualtBranch
in .gitconfig
and the branch name used in the test. This is environment dependent though, so is not a general fix.
Describe the bug (required)
The
AheadBehindTest
fails ifdefaultBranch
is not equal tomaster
in.gitconfig
.Tell us about your plugin configuration (required)
Not applicable
Tell us about the Plugin version used (required)
Master branch
Tell us about the Maven version used (required)
Not applicable
Steps to Reproduce (required)
Change all references to master to test in
AheadBehindTest
. See https://github.com/jkylling/git-commit-id-maven-plugin/commit/32de0ed4d877359546837e2c0925a99fc22d9b4eAre there any stacktraces or any error messages? (required)
Is there a (public) project where this issue can be reproduced? (optional)
No response
Your Environment (optional)
No response
Context (optional)
The cause seems to be within jgit which does not set the
initialBranch
when initializing a repository when cloning. A workaround is to modify.gitconfig
defaultBranch
, or changemaster
in the test to the value ofdefaultBranch
. There is probably a way to fix the test to not rely on the value ofinitialBranch
.