Closed wevtimoteo closed 4 years ago
It seems it return a exit status 1
:
$ git config --get-all pair.coauthor
$ echo $?
1
@amadeu01 and I investigated Git Hooks Documentation and we realized that we should use commit-msg
instead pre-commit
hook:
The commit-msg hook takes one parameter, which again is the path to a temporary file that contains the commit message written by the developer. If this script exits non-zero, Git aborts the commit process, so you can use it to validate your project state or commit message before allowing a commit to go through.
As described in README
init
action will be resposible to setup:pre-commit
hook that will appendCo-authored-by
to commit messagesAccording with
git-config
docs:We can create this file under
.git/hooks/pre-commit
(investigate if can we append any suffix to it, such aspre-commit-append-coauthors
)Additional information
So there is no need to set up an empty
key
under.git/config
, using--get-all
it will return nothing in case of absence: