dulwich-users team mailing list archive
-
dulwich-users team
-
Mailing list archive
-
Message #00636
Re: [PATCH 09/34] objects: Add lookup_path method to Tree.
On Fri, Jul 29, 2011 at 06:56, Jelmer Vernooij <jelmer@xxxxxxxxx> wrote:
> On Thu, 2011-07-28 at 10:16 -0700, dborowitz@xxxxxxxxxx wrote:
> > From: Dave Borowitz <dborowitz@xxxxxxxxxx>
> >
> > The proximate reason for this change is to avoid a circular import in
> > diff_tree.
> >
> [...]
> > class MissingObjectFinder(object):
> > diff --git a/dulwich/objects.py b/dulwich/objects.py
> > index a3c3d25..51ee24d 100644
> > --- a/dulwich/objects.py
> > +++ b/dulwich/objects.py
> > @@ -919,6 +919,26 @@ class Tree(ShaFile):
> > text.append("%04o %s %s\t%s\n" % (mode, kind, hexsha, name))
> > return "".join(text)
> >
> > + def lookup_path(self, lookup_obj, path):
> > + """Look up an object in a Git tree.
> > +
> > + :param lookup_obj: Callback for retrieving object by SHA1
> > + :param root_sha: SHA1 of the root tree
> The root sha seems implied now (ie, self.id). I've removed this line.
>
Oops, thanks.
> Cheers,
>
> Jelmer
>
>
References