diff options
author | David Aguilar <davvid@gmail.com> | 2008-05-28 21:28:15 -0700 |
---|---|---|
committer | David Aguilar <davvid@gmail.com> | 2008-05-28 21:28:15 -0700 |
commit | 1accc498c40e684f870d38b7d128739a0ebf57cf (patch) | |
tree | 40cc6b570491cc0a2d4f9ff2ec28b07d3cfdac52 | |
parent | 254d04aa3180eb8b8daf7b7ff25f010cd69b4e7d (diff) | |
download | gitpython-1accc498c40e684f870d38b7d128739a0ebf57cf.tar.gz |
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 <davvid@gmail.com>
-rw-r--r-- | lib/git_python/git.py | 3 |
1 files changed, 1 insertions, 2 deletions
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)) |