[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jgit-dev] RevWalk problems with shallow clones
|
On Thu, Aug 4, 2011 at 03:36, Marc Strapetz <marc.strapetz@xxxxxxxxxxx> wrote:
> A RevWalk on a repository which had been cloned with --depth flag
> results in following stack trace. I'm wondering if PendingGenerator
> could be more tolerant if told so by some kind of flag? The flag would
> probably be set when .git/shallow exists.
Right, we have not yet implemented shallow client support in JGit.
The way to do handle the shallow stuff is to actually insert
pre-parsed RevCommit objects into the RevWalk object pool that have
the parents truncated away, similar to a graft (which we also don't
support). This will keep JGit from walking backwards into the commits
it doesn't have, and thus avoid the MissingObjectException you noted.
That isn't a complete solution, the transport code also needs to know
how to fetch into a shallow repository. But it would certainly help to
fix RevWalk so its not crashing.
--
Shawn.