-
Notifications
You must be signed in to change notification settings - Fork 302
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
Improve gitdir handling with submodules #135
Conversation
When using git submodules, some versions of git (e.g., 1.7.9) use abosulate path in the gitdir reference of the submodules. This patch adds support to handle absoluate path correctly.
When searching for the git directory of a project the search follows the project's basedir parent directory rather than following the project hierarchy (which is not correct)
@ktoso I was wondering whether you had a chance to look at this pull request |
Sorry, not yet, was very busy with Akka this week. But should be able to Thanks for your patience! Konrad
|
File basedir = mavenProject.getBasedir(); | ||
while (basedir != null) { | ||
File gitdir = new File(basedir, Constants.DOT_GIT); | ||
if (gitdir != null && gitdir.exists()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gitdir is always != null
here
Seems good to me, and tests pass. Unless I missed some edge case this should be fine - thanks for the contribution! |
Improve gitdir handling with submodules
Hi thanks for the great project, so that we can track the commit message in the distribute env easily. I have a question about searching for .git in the parent directory: do we need to add an option to not search the parent directory when finding the Now we will search all parent directories from the current directory to find the The background of this case is that I am contributing to an open-source project. this project wants to report an error without |
Thanks for the plugin!
This pull req fixes two issues I encountered: