Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

git worktrees seem to break this lib #136

Open
jeacott1 opened this issue Jun 17, 2022 · 2 comments
Open

git worktrees seem to break this lib #136

jeacott1 opened this issue Jun 17, 2022 · 2 comments

Comments

@jeacott1
Copy link

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)
@tomasbjerre
Copy link
Owner

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.

@jeacott1
Copy link
Author

@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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants