diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-10-27 20:18:52 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-10-27 20:19:03 +0200 |
commit | 2c0b92e40ece170b59bced0cea752904823e06e7 (patch) | |
tree | 6af0b302cf325b99d3133f52c9087a6ddd7c53c0 /lib/git/index | |
parent | 97ab197140b16027975c7465a5e8786e6cc8fea1 (diff) | |
download | gitpython-2c0b92e40ece170b59bced0cea752904823e06e7.tar.gz |
cmd: improved error handling and debug printing
head.reset: will now handle resets with paths much better, especially in the --mixed case, see http://github.com/Byron/GitPython/issues#issue/2
Diffstat (limited to 'lib/git/index')
-rw-r--r-- | lib/git/index/base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/git/index/base.py b/lib/git/index/base.py index 86160990..a28374b0 100644 --- a/lib/git/index/base.py +++ b/lib/git/index/base.py @@ -1059,6 +1059,9 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): :param head: If True, the head will be set to the given commit. This is False by default, but if True, this method behaves like HEAD.reset. + + :param paths: if given as an iterable of absolute or repository-relative paths, + only these will be reset to their state at the given commit'ish :param kwargs: Additional keyword arguments passed to git-reset @@ -1080,6 +1083,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): else: # what we actually want to do is to merge the tree into our existing # index, which is what git-read-tree does + # TODO: incorporate the given paths ! new_inst = type(self).from_tree(self.repo, commit) self.entries = new_inst.entries self.write() |