From 3c9f55dd8e6697ab2f9eaf384315abd4cbefad38 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 21 Oct 2009 22:53:51 +0200 Subject: remote: Added fetch, pull, push methods to the interface to make these operations more convenient, like repo.remotes.origin.fetch --- lib/git/cmd.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/git/cmd.py') 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)] -- cgit v1.2.1