summaryrefslogtreecommitdiff
path: root/lib/git/index/base.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-22 09:52:52 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-22 09:52:52 +0200
commitd2d9197cfe5d3b43cb8aee182b2e65c73ef9ab7b (patch)
tree41e99a3b5a73f8ea1ef48abc8046b6f28b8aca3b /lib/git/index/base.py
parent69dd8750be1fbf55010a738dc1ced4655e727f23 (diff)
downloadgitpython-d2d9197cfe5d3b43cb8aee182b2e65c73ef9ab7b.tar.gz
Tree-Writing now works after fixing an off-by-one error
Diffstat (limited to 'lib/git/index/base.py')
-rw-r--r--lib/git/index/base.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/git/index/base.py b/lib/git/index/base.py
index 96a9430c..48b2d766 100644
--- a/lib/git/index/base.py
+++ b/lib/git/index/base.py
@@ -889,40 +889,41 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
@default_index
def checkout(self, paths=None, force=False, fprogress=lambda *args: None, **kwargs):
- """
- Checkout the given paths or all files from the version known to the index into
+ """Checkout the given paths or all files from the version known to the index into
the working tree.
+
+ :note: Be sure you have written pending changes using the ``write`` method
+ in case you have altered the enties dictionary directly
- ``paths``
+ :param paths:
If None, all paths in the index will be checked out. Otherwise an iterable
of relative or absolute paths or a single path pointing to files or directories
in the index is expected.
- ``force``
+ :param force:
If True, existing files will be overwritten even if they contain local modifications.
If False, these will trigger a CheckoutError.
- ``fprogress``
+ :param fprogress:
see Index.add_ for signature and explanation.
The provided progress information will contain None as path and item if no
explicit paths are given. Otherwise progress information will be send
prior and after a file has been checked out
- ``**kwargs``
+ :param **kwargs:
Additional arguments to be pasesd to git-checkout-index
- Returns
+ :return:
iterable yielding paths to files which have been checked out and are
guaranteed to match the version stored in the index
- Raise CheckoutError
+ :raise CheckoutError:
If at least one file failed to be checked out. This is a summary,
hence it will checkout as many files as it can anyway.
If one of files or directories do not exist in the index
( as opposed to the original git command who ignores them ).
Raise GitCommandError if error lines could not be parsed - this truly is
- an exceptional state
- """
+ an exceptional state"""
args = ["--index"]
if force:
args.append("--force")