Added a helper git config file to simplify marking bugfixes in commits

To enable the config file run (in the root source directory):
git config --add include.path "$(pwd)/helpers/git/fixes_alias"

Then after commiting a change, you can decorate the commit with appropriate lines by:
git fixes 123456
This commit is contained in:
Maciej Suminski 2016-08-12 11:26:15 +02:00
parent dd395a6854
commit 6c467a5041
1 changed files with 5 additions and 0 deletions

5
helpers/git/fixes_alias Normal file
View File

@ -0,0 +1,5 @@
[alias]
fixes = "!f() { \
COMMIT_MSG=$(git log -1 --format=medium | tail -n +5 | sed -e 's/^ //'); \
git commit --amend -m \"${COMMIT_MSG}\n\nFixes: lp:$1\n* https://bugs.launchpad.net/kicad/+bug/$1\"; \
}; f"