From 332521ac1d94f743b06273e6a8daf91ce93aed7d Mon Sep 17 00:00:00 2001 From: Marcos Dione Date: Thu, 20 Aug 2015 00:09:26 +0200 Subject: [PATCH 1/2] fix(cmd): make short options with arguments become two separate arguments for the executable. --- git/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/cmd.py b/git/cmd.py index 31865d090..3cdc68ab7 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -700,7 +700,7 @@ def custom_environment(self, **kwargs): finally: self.update_environment(**old_env) - def transform_kwargs(self, split_single_char_options=False, **kwargs): + def transform_kwargs(self, split_single_char_options=True, **kwargs): """Transforms Python style kwargs into git command line options.""" args = list() for k, v in kwargs.items(): From ec15e53439d228ec64cb260e02aeae5cc05c5b2b Mon Sep 17 00:00:00 2001 From: Marcos Dione Date: Thu, 20 Aug 2015 00:18:48 +0200 Subject: [PATCH 2/2] fix(test): update to changes. --- git/test/test_git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/test/test_git.py b/git/test/test_git.py index f386150f5..3e3e21e48 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -65,7 +65,7 @@ def test_it_raises_errors(self): def test_it_transforms_kwargs_into_git_command_arguments(self): assert_equal(["-s"], self.git.transform_kwargs(**{'s': True})) - assert_equal(["-s5"], self.git.transform_kwargs(**{'s': 5})) + assert_equal(["-s", "5"], self.git.transform_kwargs(**{'s': 5})) assert_equal(["--max-count"], self.git.transform_kwargs(**{'max_count': True})) assert_equal(["--max-count=5"], self.git.transform_kwargs(**{'max_count': 5}))