diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-25 23:58:24 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-25 23:58:24 +0200 |
commit | 47e3138ee978ce708a41f38a0d874376d7ae5c78 (patch) | |
tree | 0880f5c8f2a375e718c69fcffd15e87b7f4aecae /lib/git/objects/fun.py | |
parent | 58fb1187b7b8f1e62d3930bdba9be5aba47a52c6 (diff) | |
download | gitpython-47e3138ee978ce708a41f38a0d874376d7ae5c78.tar.gz |
Adjusted all files to (hopefully) deal with the fact that all objects now use 20 byte sha's internally as it is closer to the GitDB implementation
Switched all remaining files back to tabs
Adjusted all remaining docstrings to suit the sphinx doc convention - its likely that there are many of docstring syntax errors though
Diffstat (limited to 'lib/git/objects/fun.py')
-rw-r--r-- | lib/git/objects/fun.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/git/objects/fun.py b/lib/git/objects/fun.py index 5b39ab0c..2d0fd634 100644 --- a/lib/git/objects/fun.py +++ b/lib/git/objects/fun.py @@ -1,9 +1,10 @@ """Module with functions which are supposed to be as fast as possible""" +from stat import S_ISDIR __all__ = ('tree_to_stream', 'tree_entries_from_data', 'traverse_trees_recursive', 'traverse_tree_recursive') -from stat import S_ISDIR + def tree_to_stream(entries, write): @@ -99,7 +100,7 @@ def _to_full_path(item, path_prefix): def traverse_trees_recursive(odb, tree_shas, path_prefix): """ - :return: list with entries according to the given tree-shas. + :return: list with entries according to the given binary tree-shas. The result is encoded in a list of n tuple|None per blob/commit, (n == len(tree_shas)), where * [0] == 20 byte sha @@ -165,7 +166,7 @@ def traverse_trees_recursive(odb, tree_shas, path_prefix): def traverse_tree_recursive(odb, tree_sha, path_prefix): """ - :return: list of entries of the tree pointed to by tree_sha. An entry + :return: list of entries of the tree pointed to by the binary tree_sha. An entry has the following format: * [0] 20 byte sha * [1] mode as int |