diff options
author | Antoine Musso <hashar@free.fr> | 2014-11-16 20:51:04 +0100 |
---|---|---|
committer | Antoine Musso <hashar@free.fr> | 2014-11-16 20:51:21 +0100 |
commit | be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 (patch) | |
tree | 7d0124054760421d95a6f675d8e843e42a72ad82 /git/index/fun.py | |
parent | f5d11b750ecc982541d1f936488248f0b42d75d3 (diff) | |
download | gitpython-be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6.tar.gz |
pep8 linting (blank lines expectations)
E301 expected 1 blank line, found 0
E302 expected 2 blank lines, found 1
E303 too many blank lines (n)
Diffstat (limited to 'git/index/fun.py')
-rw-r--r-- | git/index/fun.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git/index/fun.py b/git/index/fun.py index ede7e43f..2fb09675 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -99,6 +99,7 @@ def write_cache(entries, stream, extension_data=None, ShaStreamCls=IndexFileSHA1 # write the sha over the content stream.write_sha() + def read_header(stream): """Return tuple(version_long, num_entries) from the given stream""" type_id = stream.read(4) @@ -110,6 +111,7 @@ def read_header(stream): assert version in (1, 2) return version, num_entries + def entry_key(*entry): """:return: Key suitable to be used for the index.entries dictionary :param entry: One instance of type BaseIndexEntry or the path and the stage""" @@ -119,6 +121,7 @@ def entry_key(*entry): return tuple(entry) # END handle entry + def read_cache(stream): """Read a cache file from the given stream :return: tuple(version, entries_dict, extension_data, content_sha) @@ -166,6 +169,7 @@ def read_cache(stream): return (version, entries, extension_data, content_sha) + def write_tree_from_cache(entries, odb, sl, si=0): """Create a tree from the given sorted list of entries and put the respective trees into the given object database @@ -221,9 +225,11 @@ def write_tree_from_cache(entries, odb, sl, si=0): istream = odb.store(IStream(str_tree_type, len(sio.getvalue()), sio)) return (istream.binsha, tree_items) + def _tree_entry_to_baseindexentry(tree_entry, stage): return BaseIndexEntry((tree_entry[1], tree_entry[0], stage << CE_STAGESHIFT, tree_entry[2])) + def aggressive_tree_merge(odb, tree_shas): """ :return: list of BaseIndexEntries representing the aggressive merge of the given |