summaryrefslogtreecommitdiff
path: root/lib/git/repo.py
diff options
context:
space:
mode:
authorSteve Frécinaux <code@istique.net>2008-09-05 23:04:58 +0200
committerSteve Frécinaux <code@istique.net>2008-09-05 23:04:58 +0200
commit43eb1edf93c381bf3f3809a809df33dae23b50d9 (patch)
tree616cc636a1f5aacd31d3b7707d621e5fe8397151 /lib/git/repo.py
parentb377c07200392ac35a6ed668673451d3c9b1f5c7 (diff)
downloadgitpython-43eb1edf93c381bf3f3809a809df33dae23b50d9.tar.gz
Initialize trees completely in tree.__bake__().
This is a simplification of the tree baking code. As a matter of consequency, Tree.construct() and tree.construct_initialize() have been killed, and repo.tree() has lost the "paths" argument. This is not a problem since one can just have the same result with: dict(k, o for k, o in tree.items() if k in paths)
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r--lib/git/repo.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py
index 0e52fab7..86057d8b 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -199,24 +199,22 @@ class Repo(object):
diff_refs = list(set(other_repo_refs) - set(repo_refs))
return map(lambda ref: Commit.find_all(other_repo, ref, max_count=1)[0], diff_refs)
- def tree(self, treeish = 'master', paths = []):
+ def tree(self, treeish = 'master'):
"""
The Tree object for the given treeish reference
``treeish``
is the reference (default 'master')
- ``paths``
- is an optional Array of directory paths to restrict the tree (default [])
Examples::
- repo.tree('master', ['lib/'])
+ repo.tree('master')
Returns
``GitPython.Tree``
"""
- return Tree.construct(self, treeish, paths)
+ return Tree(self, id=treeish)
def blob(self, id):
"""