From 47e3138ee978ce708a41f38a0d874376d7ae5c78 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 25 Jun 2010 23:58:24 +0200 Subject: 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 --- lib/git/objects/fun.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/git/objects/fun.py') 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 -- cgit v1.2.3