8000 Add support for `git config commit.cleanup` & `git config commit.verbose` by nikitabobko · Pull Request #126 · mystor/git-revise · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nikitabobko
Copy link
@nikitabobko nikitabobko commented Jul 2, 2022

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

@nikitabobko nikitabobko force-pushed the bobko/commit-cleanup-and-verbose branch 3 times, most recently from c8aea70 to 4fc1ce0 Compare July 3, 2022 22:55
nikitabobko and others added 7 commits January 11, 2023 21:34
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>
@nikitabobko nikitabobko force-pushed the bobko/commit-cleanup-and-verbose branch from 4fc1ce0 to 979242e Compare January 11, 2023 20:56
@nikitabobko
Copy link
Author

Force push to resolve conflicts

@nikitabobko
Copy link
Author

This PR might look big and hard to review. But just review it commit-by-commit. I spent time making it easy to review

@maxwell-k
Copy link

I've been using this branch for a few months without any issues, I am very happy with it.

@Aleksbgbg
Copy link

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.

Aleksbgbg added a commit to Aleksbgbg/git-revise that referenced this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0