Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ def transform_kwarg(self, name, value, split_single_char_options):
else:
if value is True:
return ["--%s" % dashify(name)]
elif value not in (False, None):
elif value is not False and value is not None:
return ["--%s=%s" % (dashify(name), value)]
return []

Expand Down
1 change: 1 addition & 0 deletions git/test/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_it_transforms_kwargs_into_git_command_arguments(self):

assert_equal(["--max-count"], self.git.transform_kwargs(**{'max_count': True}))
assert_equal(["--max-count=5"], self.git.transform_kwargs(**{'max_count': 5}))
assert_equal(["--max-count=0"], self.git.transform_kwargs(**{'max_count': 0}))
assert_equal([], self.git.transform_kwargs(**{'max_count': None}))

# Multiple args are supported by using lists/tuples
Expand Down