-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin fails in git worktree even when native git is used #639
Comments
cc @TheSnoozer since I believe it was your commit bbf8e1a which changed this behavior. |
Thanks for the detailed report! Will take a look. In the linked trino ticket I see that you have found a temporary workaround. Certainly this is not ideal...but would need to understand how to fix it properly. |
Mhh I'm looking at the change-set you linked: Before the basedir where the git is operating was determined by
After the change it is now simplified to:
with
so the old implementation was asking |
Thanks for taking a look @TheSnoozer ! Is there different/fallback logic to determine the
So it seems like there is some other logic at play here? As for why the change broke it, your argument for why it should have been the same is compelling :) FWIW there are no symlinks involved here. As you can see from the linked Trino issue, to get it to work I had to use It seems the simplest fix would actually be to change the default for |
….9.10 -> io.github.git-commit-id:git-commit-id-maven-plugin 6.0.0" This reverts commit ddac45e. Has a bug when use james-project with git submodule: git-commit-id/git-commit-id-maven-plugin#639 The bug is not closed
….9.10 -> io.github.git-commit-id:git-commit-id-maven-plugin 6.0.0" This reverts commit ddac45e. Has a bug when use james-project with git submodule: git-commit-id/git-commit-id-maven-plugin#639 The bug is not closed
The logic which sets git-commit-id-maven-plugin/src/main/java/pl/project13/maven/git/GitDirLocator.java Line 63 in e7c6238
Unfortunately, processGitDirFile is only aware of submodulesgit-commit-id-maven-plugin/src/main/java/pl/project13/maven/git/GitDirLocator.java Lines 108 to 112 in e7c6238
A naive fix would be to change For anyone else stumbling on this issue, I found it helpful to run |
Describe the bug (required)
This plugin never worked out of the box with git worktrees (#215) due to
jGit
limitations, but it was fairly easy to work around this issue by using native git as recommended in the comments on that issue. However recently this was broken by bbf8e1a. With this commit, even when native git is used, I get an error like:The issue appears to be that it is incorrectly detecting the directory in which to run the native git commands using the new approach in the aforementioned commit.
Tell us about your plugin configuration (required)
This comes from the trino project which itself pulls the dependency on the commit-id plugin from airlift/airbase.
The root
pom.xml
in Trino has:The
pom.xml
pulled fromairbase
has:Tell us about the Plugin version used (required)
6.0.0
Tell us about the Maven version used (required)
Steps to Reproduce (required)
master
branch of thetrinodb/trino
project into this worktreeAre there any stacktraces or any error messages? (required)
From the message, it looks like the
dotGitDirectory
is incorrectly being detected as.git/worktrees/master
, when it really should bemaster/.git
(wheremaster
is the name of the worktree).Is there a (public) project where this issue can be reproduced? (optional)
Trino
Your Environment (optional)
No response
Context (optional)
No response
The text was updated successfully, but these errors were encountered: