Skip to content

Fix test_commit_msg_hook_success. #925

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

Merged
merged 1 commit into from
Sep 28, 2019

Conversation

uri-canva
Copy link
Contributor

Test hooks are created with a sh shebang: https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_index.py#L53

however in sh echo doesn't always support -n, and can print it out:

$ bash -c "echo -n hello"
hello # <- no newline here
$ sh -c "echo -n hello"
-n hello # <- newline here

Instead of echo -n use printf which works correctly in all shs.

@Byron Byron added this to the v3.0.3 - Bugfixes milestone Sep 28, 2019
@Byron
Copy link
Member

Byron commented Sep 28, 2019

Thanks a lot for your contribution :)!
Keep 'em coming!

@Byron Byron merged commit 4bf53a3 into gitpython-developers:master Sep 28, 2019
@uri-canva uri-canva deleted the fix-sh branch September 28, 2019 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants