Skip to main content

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

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(JGitSourceReferencesProvider.java:44)

Caused by: org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: /d01/sandboxes/myproj/.git/worktrees/myproject.mybranch
        at org.eclipse.jgit.storage.file.FileRepositoryBuilder.build(FileRepositoryBuilder.java:94)
        at org.eclipse.tycho.extras.sourceref.jgit.JGitSourceReferencesProvider.getSourceReferencesHeader(JGitSourceReferencesProvider.java:41)

Bugzilla has nothing for Tycho product with search for "worktree" other than https://bugs.eclipse.org/bugs/show_bug.cgi?id=419520, which was resolved in 0.19 and doesn't relate to tycho-packaging-plugin or building in a worktree. 

[1] https://git-scm.com/docs/git-worktree

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.


Back to the top