Discussion:
[tycho-user] Tycho Extras sourceref.jgit plugin and Git worktrees
Justin Georgeson
2017-09-20 20:03:01 UTC
Permalink
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.
Matthias Sohn
2017-09-20 20:15:52 UTC
Permalink
On Wed, Sep 20, 2017 at 10:03 PM, Justin Georgeson <
Post by Justin Georgeson
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
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)
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
JGit support for multiple worktrees is not yet available, there is a draft
which is still unfinished
https://git.eclipse.org/r/#/c/67873/
Justin Georgeson
2017-09-20 20:25:19 UTC
Permalink
☹ thanks.

From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] On Behalf Of Matthias Sohn
Sent: Wednesday, September 20, 2017 3:16 PM
To: Tycho user list <tycho-***@eclipse.org>
Subject: [EXTERNAL] Re: [tycho-user] Tycho Extras sourceref.jgit plugin and Git worktrees

External Sender: Use caution with links/attachments.

On Wed, Sep 20, 2017 at 10:03 PM, Justin Georgeson <***@halliburton.com<mailto:***@halliburton.com>> 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(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<https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.eclipse.org_bugs_show-5Fbug.cgi-3Fid-3D419520&d=DwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=IaG729QyGh1osYCbh8OX9axItHyepxef_hVPx52Ly1s&m=A2HQtHXDBENc5vW9sUw31h4FLE_MFKZTDN7GMpc9jH8&s=DoCvWjHWMSXummq133fCOu7vufbaFGucH1RnrbhQOWE&e=>, 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<https://urldefense.proofpoint.com/v2/url?u=https-3A__git-2Dscm.com_docs_git-2Dworktree&d=DwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=IaG729QyGh1osYCbh8OX9axItHyepxef_hVPx52Ly1s&m=A2HQtHXDBENc5vW9sUw31h4FLE_MFKZTDN7GMpc9jH8&s=VaLHQVYgKgWOmgXgUamP1L1mcHlRm3eyCUy9G0a0UFQ&e=>

JGit support for multiple worktrees is not yet available, there is a draft which is still unfinished
https://git.eclipse.org/r/#/c/67873/<https://urldefense.proofpoint.com/v2/url?u=https-3A__git.eclipse.org_r_-23_c_67873_&d=DwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=IaG729QyGh1osYCbh8OX9axItHyepxef_hVPx52Ly1s&m=A2HQtHXDBENc5vW9sUw31h4FLE_MFKZTDN7GMpc9jH8&s=DE6DGr5zNul6pc3PIONyxWFLOxsPyX7hzvROkIRk3FI&e=>

----------------------------------------------------------------------
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.
Loading...