summaryrefslogtreecommitdiff
path: root/lib/git/index/base.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-29 18:28:31 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-29 18:28:31 +0200
commit160081b9a7ca191afbec077c4bf970cfd9070d2c (patch)
tree5e47a446919fbdd5f7a9a82b6944dc2f1b32bdba /lib/git/index/base.py
parent6917ae4ce9eaa0f5ea91592988c1ea830626ac3a (diff)
downloadgitpython-160081b9a7ca191afbec077c4bf970cfd9070d2c.tar.gz
Updated and fixed sphinx API docs, which included one quick skim-through
Diffstat (limited to 'lib/git/index/base.py')
-rw-r--r--lib/git/index/base.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/git/index/base.py b/lib/git/index/base.py
index 03da52b7..1a8bee93 100644
--- a/lib/git/index/base.py
+++ b/lib/git/index/base.py
@@ -4,7 +4,7 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
"""Module containing Index implementation, allowing to perform all kinds of index
-manipulations such as querying and merging. """
+manipulations such as querying and merging."""
import tempfile
import os
import sys
@@ -75,22 +75,26 @@ __all__ = ( 'IndexFile', 'CheckoutError' )
class IndexFile(LazyMixin, diff.Diffable, Serializable):
- """Implements an Index that can be manipulated using a native implementation in
+ """
+ Implements an Index that can be manipulated using a native implementation in
order to save git command function calls wherever possible.
-
+
It provides custom merging facilities allowing to merge without actually changing
your index or your working tree. This way you can perform own test-merges based
on the index only without having to deal with the working copy. This is useful
in case of partial working trees.
``Entries``
+
The index contains an entries dict whose keys are tuples of type IndexEntry
to facilitate access.
You may read the entries dict or manipulate it using IndexEntry instance, i.e.::
+
index.entries[index.entry_key(index_entry_instance)] = index_entry_instance
- Otherwise changes to it will be lost when changing the index using its methods.
- """
+
+ Make sure you use index.write() once you are done manipulating the index directly
+ before operating on it using the git command"""
__slots__ = ("repo", "version", "entries", "_extension_data", "_file_path")
_VERSION = 2 # latest version we support
S_IFGITLINK = 0160000 # a submodule
@@ -250,7 +254,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
:param repo: The repository treeish are located in.
- :param *tree_sha:
+ :param tree_sha:
20 byte or 40 byte tree sha or tree objects
:return:
@@ -276,7 +280,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
:param repo:
The repository treeish are located in.
- :param *treeish:
+ :param treeish:
One, two or three Tree Objects, Commits or 40 byte hexshas. The result
changes according to the amount of trees.
If 1 Tree is given, it will just be read into a new index
@@ -287,7 +291,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
being the common ancestor of tree 2 and tree 3. Tree 2 is the 'current' tree,
tree 3 is the 'other' one
- :param **kwargs:
+ :param kwargs:
Additional arguments passed to git-read-tree
:return:
@@ -790,7 +794,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
removing the respective file. This may fail if there are uncommited changes
in it.
- :param **kwargs:
+ :param kwargs:
Additional keyword arguments to be passed to git-rm, such
as 'r' to allow recurive removal of
@@ -828,7 +832,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
:param skip_errors:
If True, errors such as ones resulting from missing source files will
be skpped.
- :param **kwargs:
+ :param kwargs:
Additional arguments you would like to pass to git-mv, such as dry_run
or force.
@@ -924,7 +928,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
explicit paths are given. Otherwise progress information will be send
prior and after a file has been checked out
- :param **kwargs:
+ :param kwargs:
Additional arguments to be pasesd to git-checkout-index
:return: