diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-21 22:53:51 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-21 22:53:51 +0200 |
commit | 3c9f55dd8e6697ab2f9eaf384315abd4cbefad38 (patch) | |
tree | 06cc50a0ed54e375ce8ca182f3307949ca25b666 /lib/git/cmd.py | |
parent | bb509603e8303cd8ada7cfa1aaa626085b9bb6d6 (diff) | |
download | gitpython-3c9f55dd8e6697ab2f9eaf384315abd4cbefad38.tar.gz |
remote: Added fetch, pull, push methods to the interface to make these operations more convenient, like repo.remotes.origin.fetch
Diffstat (limited to 'lib/git/cmd.py')
-rw-r--r-- | lib/git/cmd.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/git/cmd.py b/lib/git/cmd.py index d04a2bd0..485a1553 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -261,7 +261,9 @@ class Git(object): such as in 'ls_files' to call 'ls-files'. ``args`` - is the list of arguments + is the list of arguments. If None is included, it will be pruned. + This allows your commands to call git more conveniently as None + is realized as non-existent ``kwargs`` is a dict of keyword arguments. @@ -287,7 +289,7 @@ class Git(object): # Prepare the argument list opt_args = self.transform_kwargs(**kwargs) - ext_args = self.__unpack_args(args) + ext_args = self.__unpack_args([a for a in args if a is not None]) args = opt_args + ext_args call = ["git", dashify(method)] |