Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Tycho Extras sourceref.jgit plugin and Git worktrees

On Wed, Sep 20, 2017 at 10:03 PM, Justin Georgeson <Justin.Georgeson@xxxxxxxxxxxxxxx> wrote:
I'm seeing an error with the packaging plugin when building inside a Git worktree [1] (other than the default worktree created by the initial clone).

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.22.0:package-plugin (default-package-plugin) on project com.example.myproj: IO exception trying to create git repo : repository not found: /d01/sandboxes/myproj/.git/worktrees/myproject.mybranch

In a worktree, the .git is not a folder, but instead a text file containing the path that is in the error. The stacktrace shows the error is coming from JGit

Caused by: org.apache.maven.plugin.MojoExecutionException: IO exception trying to create git repo
        at org.eclipse.tycho.extras.sourceref.jgit.JGitSourceReferencesProvider.getSourceReferencesHeader(

Caused by: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /d01/sandboxes/myproj/.git/worktrees/myproject.mybranch
        at org.eclipse.tycho.extras.sourceref.jgit.JGitSourceReferencesProvider.getSourceReferencesHeader(

Bugzilla has nothing for Tycho product with search for "worktree" other than, which was resolved in 0.19 and doesn't relate to tycho-packaging-plugin or building in a worktree.


JGit support for multiple worktrees is not yet available, there is a draft which is still unfinished

Back to the top