mystor / git-revise

A handy tool for doing efficient in-memory commit rebases & fixups
MIT License
748 stars 31 forks source link

[Feature request] Add git-config commit.cleanup support #108

Open nikitabobko opened 2 years ago

nikitabobko commented 2 years ago

Quote from man git-commit:

--cleanup=<mode>
    This option determines how the supplied commit message should be cleaned up before committing. The <mode> can be strip, whitespace, verbatim, scissors or default.

    strip
        Strip leading and trailing empty lines, trailing whitespace, commentary and collapse consecutive empty lines.

    whitespace
        Same as strip except #commentary is not removed.

    verbatim
        Do not change the message at all.

    scissors
        Same as whitespace except that everything from (and including) the line found below is truncated, if the message is to be edited. "#" can be customized with core.commentChar.

            # ------------------------ >8 ------------------------

    default
        Same as strip if the message is to be edited. Otherwise whitespace.

    The default can be changed by the commit.cleanup configuration variable (see git-config(1)).