summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorAndrew Rabert <ar@nullsum.net>2018-07-26 20:25:46 -0400
committerSebastian Thiel <byronimo@gmail.com>2018-08-05 14:00:27 +0200
commita8591a094a768d73e6efb5a698f74d354c989291 (patch)
treef9f0c7f5381d105d1c98ec989ede52b25b0c04f1 /git/cmd.py
parentb3d9b8df38dacfe563b1dd7abb9d61b664c21186 (diff)
downloadgitpython-a8591a094a768d73e6efb5a698f74d354c989291.tar.gz
Exclude kwarg when None
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 30028487..b6305176 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -885,7 +885,7 @@ class Git(LazyMixin):
if len(name) == 1:
if value is True:
return ["-%s" % name]
- elif type(value) is not bool:
+ elif value not in (False, None):
if split_single_char_options:
return ["-%s" % name, "%s" % value]
else:
@@ -893,7 +893,7 @@ class Git(LazyMixin):
else:
if value is True:
return ["--%s" % dashify(name)]
- elif type(value) is not bool:
+ elif value not in (False, None):
return ["--%s=%s" % (dashify(name), value)]
return []