From 1accc498c40e684f870d38b7d128739a0ebf57cf Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Wed, 28 May 2008 21:28:15 -0700 Subject: git.py: properly handle single-character flags with arguments "git diff -U5" is correct while "git diff -U 5" is not. ditto for "git log -U5", "git commit -F/some/path", etc. The original version of transform_kwargs was setting up the command line arguments such that single-character flags with arguments were not understood by git. This changes transform_kwargs so that the flag and argument are both part of the same string for single-character flags. Signed-off-by: David Aguilar --- lib/git_python/git.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/git_python/git.py') diff --git a/lib/git_python/git.py b/lib/git_python/git.py index aad1f85d..87087ca7 100644 --- a/lib/git_python/git.py +++ b/lib/git_python/git.py @@ -44,8 +44,7 @@ class Git(MethodMissingMixin): if v is True: args.append("-%s" % k) else: - args.append("-%s" % k) - args.append(v) + args.append("-%s%s" % (k, v)) else: if v is True: args.append("--%s" % dashify(k)) -- cgit v1.2.1