diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-02-28 20:29:02 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-02-28 20:29:02 +0100 |
commit | 6bfdf93201ea413affd4c8fbe406ea2b4a7c1b6b (patch) | |
tree | 24cb60de55a13bf42d9b66e9b459642ed23fb557 /lib/git | |
parent | 3e14ab55a060a5637e9a4a40e40714c1f441d952 (diff) | |
download | gitpython-6bfdf93201ea413affd4c8fbe406ea2b4a7c1b6b.tar.gz |
Commit.iter_items: Will not restrict comits to the ones containing changes to paths anymore as it will only append '--' if paths are actually given.
Added unittest to verify this
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/objects/commit.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/git/objects/commit.py b/lib/git/objects/commit.py index 271b8f75..4d0f808d 100644 --- a/lib/git/objects/commit.py +++ b/lib/git/objects/commit.py @@ -165,8 +165,13 @@ class Commit(base.Object, Iterable, diff.Diffable, utils.Traversable): """ options = {'pretty': 'raw', 'as_process' : True } options.update(kwargs) + + args = list() + if paths: + args.extend(('--', paths)) + # END if paths - proc = repo.git.rev_list(rev, '--', paths, **options) + proc = repo.git.rev_list(rev, args, **options) return cls._iter_from_process_or_stream(repo, proc, True) def iter_parents(self, paths='', **kwargs): |