summaryrefslogtreecommitdiff
path: root/git/index/base.py
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2014-11-16 20:51:04 +0100
committerAntoine Musso <hashar@free.fr>2014-11-16 20:51:21 +0100
commitbe34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 (patch)
tree7d0124054760421d95a6f675d8e843e42a72ad82 /git/index/base.py
parentf5d11b750ecc982541d1f936488248f0b42d75d3 (diff)
downloadgitpython-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/base.py')
-rw-r--r--git/index/base.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/git/index/base.py b/git/index/base.py
index 9a3e80ea..601f1c0e 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -71,6 +71,7 @@ __all__ = ( 'IndexFile', 'CheckoutError' )
class IndexFile(LazyMixin, diff.Diffable, Serializable):
+
"""
Implements an Index that can be manipulated using a native implementation in
order to save git command function calls wherever possible.
@@ -174,7 +175,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
(ignore_tree_extension_data and None) or self._extension_data)
return self
-
#} END serializable interface
def write(self, file_path = None, ignore_tree_extension_data=False):
@@ -273,7 +273,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
inst.entries = entries
return inst
-
@classmethod
def from_tree(cls, repo, *treeish, **kwargs):
"""Merge the given treeish revisions into a new index which is returned.
@@ -519,7 +518,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
# copy changed trees only
mdb.stream_copy(mdb.sha_iter(), self.repo.odb)
-
# note: additional deserialization could be saved if write_tree_from_cache
# would return sorted tree entries
root_tree = Tree(self.repo, binsha, path='')
@@ -664,7 +662,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
del(paths[:])
# END rewrite paths
-
def store_path(filepath):
"""Store file at filepath in the database and return the base index entry"""
st = os.lstat(filepath) # handles non-symlinks as well
@@ -681,7 +678,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
istream.binsha, 0, to_native_path_linux(filepath)))
# END utility method
-
# HANDLE PATHS
if paths:
assert len(entries_added) == 0
@@ -691,7 +687,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
# END for each filepath
# END path handling
-
# HANDLE ENTRIES
if entries:
null_mode_entries = [ e for e in entries if e.mode == 0 ]
@@ -866,7 +861,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
return out
# END handle dryrun
-
# now apply the actual operation
kwargs.pop('dry_run')
self.repo.git.mv(args, paths, **kwargs)
@@ -989,7 +983,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
raise CheckoutError("Some files could not be checked out from the index due to local modifications", failed_files, valid_files, failed_reasons)
# END stderr handler
-
if paths is None:
args.append("--all")
kwargs['as_process'] = 1