Skip to content

Malformatted options #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
StyXman opened this issue Aug 19, 2015 · 2 comments
Closed

Malformatted options #340

StyXman opened this issue Aug 19, 2015 · 2 comments

Comments

@StyXman
Copy link
Contributor

StyXman commented Aug 19, 2015

I'm using git.Git a lot for calling low level git commands; for instance, git commit-tree. In particular, I'm trying to use the -m option, but Git.transform_kwargs() converts m='foo' into -mfoo, which git rejects:

git commit-tree -mfoo e53dc311b7e3ac674f3a6548a22113307a6af3ef -> 128; stdout: '<OUTPUT_STREAM>'; stderr: 'fatal: Not a valid object name -mfoo'

I'm not sure if the current formatting is like so for any particular reason, and I found about the split_single_char_options argument, but there seems to be no way to control that via the API.

@Byron Byron added this to the v1.0.2 - Fixes milestone Aug 19, 2015
@Byron
Copy link
Member

Byron commented Aug 19, 2015

I totally agree and am not sure myself why it is implemented in that particular way. Changing the default might be a suitable fix (e.g. setting split_single_char_options could be turned on by default).

Would you like to submit a PR for this ? Chances are everything will just work fine after that, while fixing the issue.

@StyXman
Copy link
Contributor Author

StyXman commented Aug 19, 2015

Well, the unit tests don't pass in my machine (tests py2.7 [FAILED (errors=10, failures=3)] and 3.4 [FAILED (errors=10, failures=2)]), but the fix is simple enough and travis gives OK. Maybe you can try it on your side? See #341.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants