From a58a60ac5f322eb4bfd38741469ff21b5a33d2d5 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 12 Oct 2009 23:18:43 +0200 Subject: tree: now behaves like a list with string indexing functionality - using a dict as cache is a problem as the tree is ordered, added blobs, trees and traverse method repo: remove blob function as blobs are created directly or iterated - primitve types should not clutter the repo interface --- lib/git/repo.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'lib/git/repo.py') diff --git a/lib/git/repo.py b/lib/git/repo.py index 39e84088..c1387870 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -342,19 +342,10 @@ class Repo(object): # we should also check whether the ref has a valid commit ... but lets n # not be over-critical - return Tree(self, treeish) + # the root has an empty relative path and the default mode + root = Tree(self, treeish, 0, '') + return root - def blob(self, id): - """ - The Blob object for the given id - - ``id`` - is the SHA1 id of the blob - - Returns - ``git.Blob`` - """ - return Blob(self, id=id) def log(self, commit='master', path=None, **kwargs): """ -- cgit v1.2.1