Skip to content

Commit 1d768f6

Browse files
committed
Merge pull request #341 from StyXman/master
fix(cmd): make short options with arguments become two separate argum…
2 parents c8b8379 + ec15e53 commit 1d768f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎git/cmd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def custom_environment(self, **kwargs):
700700
finally:
701701
self.update_environment(**old_env)
702702

703-
def transform_kwargs(self, split_single_char_options=False, **kwargs):
703+
def transform_kwargs(self, split_single_char_options=True, **kwargs):
704704
"""Transforms Python style kwargs into git command line options."""
705705
args = list()
706706
for k, v in kwargs.items():

‎git/test/test_git.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_it_raises_errors(self):
6565

6666
def test_it_transforms_kwargs_into_git_command_arguments(self):
6767
assert_equal(["-s"], self.git.transform_kwargs(**{'s': True}))
68-
assert_equal(["-s5"], self.git.transform_kwargs(**{'s': 5}))
68+
assert_equal(["-s", "5"], self.git.transform_kwargs(**{'s': 5}))
6969

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

0 commit comments

Comments
 (0)