Skip to main content

[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 11, 2011 at 12:05 PM, Shawn Pearce <spearce@xxxxxxxxxxx> wrote:
> 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.

A coworker implemented this a while ago
(http://egit.eclipse.org/r/#change,1320) - is there any interest in
supporting shallow clones 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.
> _______________________________________________
> jgit-dev mailing list
> jgit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jgit-dev
>


Back to the top