-
Notifications
You must be signed in to change notification settings - Fork 33
Add support for git config commit.cleanup
& git config commit.verbose
#126
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
base: main
Are you sure you want to change the base?
Add support for git config commit.cleanup
& git config commit.verbose
#126
Conversation
c8aea70
to
4fc1ce0
Compare
Rename because the function not only strips the comments but removes trailing empty lines as well. Althought I dropped `if comments:` line, this commit doesn't change any semantic or programm behaviour, because comments were never passed as `None`. Also now the code looks more valid (after I dropped `if comments:` line) because we should drop trailing empty lines even when no comments are passed. Co-authored-by: ruro <ruro.ruro@ya.ru>
This commit doesn't change any semantic or behaviour. Co-authored-by: ruro <ruro.ruro@ya.ru>
…tent This commit doesn't change any semantic or behaviour. Co-authored-by: ruro <ruro.ruro@ya.ru>
I'm going to change this function behaviour in the next commits. So let's firstly cover the current behaviour with tests. Co-authored-by: ruro <ruro.ruro@ya.ru>
Added: - Remove trailing whitespace in each line - Remove leading empty lines - Collapse consecutive empty lines Co-authored-by: ruro <ruro.ruro@ya.ru>
See `--cleanup` in `man git commit`. Fix mystor#108 Co-authored-by: ruro <ruro.ruro@ya.ru>
See `--verbose` in `man git commit`. Fix mystor#29 Co-authored-by: ruro <ruro.ruro@ya.ru>
4fc1ce0
to
979242e
Compare
Force push to resolve conflicts |
This PR might look big and hard to review. But just review it commit-by-commit. I spent time making it easy to review |
I've been using this branch for a few months without any issues, I am very happy with it. |
Hey @mystor, it seems there are a few of us who need / use this now and this PR has been sitting around for a while. Would it be possible to merge it? I can confirm that it still cherry-picks cleanly and works well on top of main, as @maxwell-k did last year. |
Fix for #108 and #29
I'm not fluent in Python so let me know about any stupid mistakes.
Each commit is atomic so the easiest way to review this PR is commit-by-commit.
Co-authored-by: @ruro