-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when git repo has no master branch #28
Comments
Found a workaround: tagged the first commit as "master" |
* Was looking at parents of master, which may not exist.
Fixed in 1.49 |
Can't work when has no master branch. I use jenkins changelog plugin, output is:
|
What version of the jenkins plugin do you use? This should have been fixed in 1.28. |
1.28 |
Can you post a screenshot of your config?
|
The git tag and your post from earlier state that this was fixed in 1.49. Why do you both say 1.28? |
This is just the library. The plugin is another project. |
The more pain about this plugin is that, when merged from other branch, it do not show the commits merged from that branch. (Jenkins Git Plugin's changelog seems can do that). |
Looks like this is causing the behavior:
Which means it cant find a value for to reference or to commit, so it defaults back to master. You may print ${TO_REVISION} in a shell build step, to see make sure it does not resolve to an empty string. You will have to be more specific about you merge issue. You need to supply output of:
And the value of from and to. |
The revision is really exists and right. Not empty string. |
I will add a merge issue next time. Thanks very much! |
What happens if you hard code a hash in the "to" field, just for testing. Does that work? |
I created #29 for the merge issue... help is welcome =) |
Did you try to hard code the "to" hash? |
I am outside now, i will try to hard code next time. But I think String Parameter is not the problem, because it works when i create the master branch. |
Perhaps you did not clone with all refs? What if you |
@coderzh I added better logging for this also. So the error now contains the references that were found. To help track down the problem. Its in the Jenkins plugin v1.30. |
I updated the new Jenkins plugin v1.32. There is no master in the ref list log. Finally, i added shell script Many thanks! |
hi getting this error @tomasbjerre can u help me resolve it
|
Hello, I'm trying to add git-changelog to my project.
My project does not have a
master
branch. I use version branches.I get this crash when I run it: https://gist.github.com/mezz/b7efe8e440acc82105486c72c9dc5158
This seems to requite a master branch:
https://github.com/tomasbjerre/git-changelog-lib/blob/master/src/main/java/se/bjurr/gitchangelog/internal/git/GitRepo.java#L314-L315
Here is my project: https://github.com/mezz/JustEnoughItems
I tried setting
fromCommit
to my first commit sha but it still crashes the same way.The text was updated successfully, but these errors were encountered: