Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

can't use grgit within submodules #66

Closed
paleozogt opened this issue May 28, 2015 · 3 comments
Closed

can't use grgit within submodules #66

paleozogt opened this issue May 28, 2015 · 3 comments
Labels
Milestone

Comments

@paleozogt
Copy link

grgit breaks when run from within a submodule. (Note that this issue is distinct from #60, where using grgit in a regular project that contains submodules causes it to misbehave. This issue is when you run grgit from inside a submodule.)

For example:

> git clone --recursive git@github.com:paleozogt/paleozogt-sandbox.git
    ...snip...

> cd paleozogt-sandbox/grgit 

> ./gradlew tasks

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/asimmons/Development/paleozogt-sandbox/grgit/build.gradle' line: 5

* What went wrong:
An exception occurred applying plugin request [id: 'org.ajoberstar.defaults', version: '0.5.3']
> repository not found: /Users/asimmons/Development/paleozogt-sandbox/grgit

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.628 secs

This example shows it happening in the grgit source, but the same error happens with a grgit-using submodule.

Note that in the example the submodule really is a git repo:

> git tag
0.2.2-beta
v0.1.0
v0.2.0
v0.2.1
v0.2.2
v0.2.3
v0.2.4-milestone.1+1643463
v0.3.0
v0.3.1
v0.4.0
v0.4.0-milestone.1
v0.4.1
v1.0.0
v1.0.0-milestone.1
v1.0.0-milestone.2
v1.0.0-rc.1
v1.0.0-rc.2
v1.1.0
v1.1.0-milestone.1
v1.1.0-rc.1
v1.2.0
v1.2.0-rc.1

Even jgit can operate on it:

> ~/Downloads/org.eclipse.jgit.pgm-3.7.0.201502260915-r.sh tag
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
0.2.2-beta
v0.1.0
v0.2.0
v0.2.1
v0.2.2
v0.2.3
v0.2.4-milestone.1+1643463
v0.3.0
v0.3.1
v0.4.0
v0.4.0-milestone.1
v0.4.1
v1.0.0
v1.0.0-milestone.1
v1.0.0-milestone.2
v1.0.0-rc.1
v1.0.0-rc.2
v1.1.0
v1.1.0-milestone.1
v1.1.0-rc.1
v1.2.0
v1.2.0-rc.1
@paleozogt
Copy link
Author

fyi, I've tested this on both Mac OS X and Ubuntu and the behavior is consistent.

@ajoberstar
Copy link
Owner

Sounds good. I'll take a look and see what I can come up with.

@ajoberstar ajoberstar added the bug label May 28, 2015
@ajoberstar ajoberstar added this to the 1.3.0 milestone May 28, 2015
@ajoberstar
Copy link
Owner

Conveniently, the fix @facewindu proposed for #64 also seems to fix this. Can you try 1.3.0-milestone.1 to verify? (use Grgit.open() instead of Grgit.open(dir: 'something')).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants