[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jgit-dev] MissingObjectException when using setBranchesToClone?
|
Hello,
My apologies if I am misunderstanding the correct usage of setBranchesToClone()
but I keep getting an org.eclipse.jgit.api.errors.JGitInternalException
"Missing unknown"/org.eclipse.jgit.errors.MissingObjectException
exception for the head of my repo when trying to use the
setBranchesToClone for only a single branch.
I have provided my implementation (and what I am seeing) as a GitHub repo at
https://github.com/cbaenziger/jgit_question.
Particularly, I'm trying to clone https://github.com/apache/oozie branch
ap-pages using the following:
CloneCommand cloneCommand = Git.cloneRepository();
cloneCommand.setURI("https://github.com/apache/oozie");
cloneCommand.setDirectory(tempD);
cloneCommand.setBranchesToClone(Arrays.asList("refs/heads/ap-pages"));
But I end up with:
Exception in thread "main" org.eclipse.jgit.api.errors.JGitInternalException:
Missing unknown 6121dc0cd19c3f7d2f4412922cffd1ff47e6f756
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:218)
at net.clayb.Test.main(Test.java:44)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown
6121dc0cd19c3f7d2f4412922cffd1ff47e6f756
at
org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:163)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:234)
at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:859)
at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:772)
at org.eclipse.jgit.api.CloneCommand.parseCommit(CloneCommand.java:437)
at org.eclipse.jgit.api.CloneCommand.checkout(CloneCommand.java:340)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:215)
... 1 more
Would anyone have a recommendation on what I am doing wrong, or should this be
captured as a bug?
Thanks!
Clay