[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jgit-dev] Implementing shallow clones
|
Matt Fischer <mattfischer84@xxxxxxxxx> wrote:
> >
> > Since shallow support is all about grabbing only a recent slice of
> > the project, ideally we would be able to do it without needing to
> > enumerate the complete history of the project. :-\
>
> Point taken. At this point, I'm inclined to say screw it and just
> implement DepthGenerator from scratch. If I start with the code from
> TopoSortGenerator, and modify it to only add parents if their depth is
> low enough, I should basically get everything I need without a whole
> lot of hassle. I know copy-paste is evil and all, but
> TopoSortGenerator is like fifty lines of fairly non-tricky code, so
> maybe that wouldn't be TOO evil? C Git does this with a little
> one-off topological sort as well, so I don't think I'm entirely
> off-base here.
I'm fine with that, as you point out its only a small amount of
code that is being duplicated.
--
Shawn.