git-changelog-lib
git-changelog-lib copied to clipboard
git worktrees seem to break this lib
running from a git worktree
echo $(npx git-changelog-command-line --print-next-version)
Exception in thread "main" shadow.se.bjurr.gitchangelog.api.exceptions.GitChangelogRepositoryException: main not found in: Repo: Repository[C:\app\test\ideatest\xx.git\worktrees\xx]
at shadow.se.bjurr.gitchangelog.internal.git.GitRepo.getRef(GitRepo.java:139)
at shadow.se.bjurr.gitchangelog.api.GitChangelogApi.getId(GitChangelogApi.java:678)
at shadow.se.bjurr.gitchangelog.api.GitChangelogApi.getChangelog(GitChangelogApi.java:624)
at shadow.se.bjurr.gitchangelog.api.GitChangelogApi.getChangelog(GitChangelogApi.java:85)
at shadow.se.bjurr.gitchangelog.api.GitChangelogApi.getHighestSemanticVersion(GitChangelogApi.java:200)
at se.bjurr.gitchangelog.main.Main.main(Main.java:748)
Are you sure there is not more stacktrace? I never tried worktree. Not really sure how one would want the library to work with it.
@tomasbjerre no more stacktrace - this is it. To be clear, I'm not asking you to add some functionality to your lib, I'm just asking that it doesnt break if a worktree is in use. I use worktrees a lot for local dev, but just the fact that they are active breaks your lib. give this a try. choose any git repo, create a worktree, and then try your lib in any of the folders. unfortunately this looks like a jgit limitation that has not yet officially been resolved. https://bugs.eclipse.org/bugs/show_bug.cgi?id=477475