dulwich-users team mailing list archive
-
dulwich-users team
-
Mailing list archive
-
Message #00727
Re: how to create an object from a SHA1 value
On Thu, Aug 30, 2012 at 03:03:43PM -0700, milki wrote:
> On 20:39 Tue 14 Aug , Wenhao Xu wrote:
> > Hi everyone,
> > I am new to dulwich and want to implement some functions like "git
> > cat-file". I am wondering given a SH1 value, how to construct an object
> > from it? I looked through the doc with no luck.
> With any SHA1, you can use repo.get_object(sha1). What it returns is
> based on what that sha1 represents - be it a commit, a blog, etc.
Alternatively just repo[sha1] should work.
Cheers,
Jelmer
References