meta:hooks:commit-msg: Allow {fixup,squash} prefix

Allow the "fixup! " and "squash! " prefix' created by the
`--fixup`/`--squash` flags to `git-commit`
This commit is contained in:
2022-04-23 12:55:45 +02:00
parent f387b08d78
commit 7126a40c71

View File

@@ -15,6 +15,10 @@ die() {
}
subject="$(head -1 "$1")"
# Ignore "fixup! " and "squash! " prefix' added by `git-commit`
subject="${subject#fixup! }"
subject="${subject#squash! }"
# Because of potential long lines in the changes (when using verbose commit) or
# comments (for example when rebasing), everything until the first comment is
# interpreted as body.