pre-commit plugin to improve default commit messages when reverting reverts
Project description
reinstate-revert-revert
A tool for cleaning up reverted-revert git commit messages. It will turn
Revert "Revert "Experiment on the flux capacitor""
This reverts commit deadc0dedeadc0dedeadc0dedeadc0dedeadc0de.
into
Reinstate "Experiment on the flux capacitor"
This reverts commit deadc0dedeadc0dedeadc0dedeadc0dedeadc0de.
And reinstates commit 0d15ea5e0d15ea5e0d15ea5e0d15ea5e0d15ea5e.
Installation
As a git hook
The simplest way to use this package is as a plugin to pre-commit.
A sample configuration:
# Without default_stages, all hooks run in all stages, which means all your
# pre-commit hooks will run in prepare-commit-msg. This is almost certainly
# not what you want. This set will run for the default hooks installed, but
# you may have to adjust it for your environment.
default_stages:
- commit
- merge-commit
repos:
# […]
- repo: https://github.com/erikogan/reinstate-revert-revert
rev: v0.1.3
hooks:
- id: reinstate-revert-revert
stages:
- prepare-commit-msg
By default, pre-commit does not install a hook for the prepare-commit-msg
stage. You probably need to add it for this to work:
pre-commit install -t prepare-commit-msg
As a standalone script
pip install reinstate-revert-revert
See reinstate-revert-revert --help
for a full set of options.
reinstate-revert-revert
takes log message file names as positional arguments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for reinstate-revert-revert-0.1.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a467ff589ae56eb844e5cbc6d35373980e54d9b65f7a8182c0a4829436d5b702 |
|
MD5 | 125c865c91027ec687d110dc92d37c80 |
|
BLAKE2b-256 | 6a375692761ae98de6d095ece9132408d11a82178bf11fecd343bd9ddbda450e |
Close
Hashes for reinstate_revert_revert-0.1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ae74ac522393ac30421fc5144498f78d2b6dc19d5240e11acbc8a47d47ee8a3 |
|
MD5 | 0e7b31ee32e52dc026b64f4a8bf05cd7 |
|
BLAKE2b-256 | 922dd1b501ca9233b023a40f0b4110f6f1802efe55fe9a6f74358e4b1296bae9 |