]> granicus.if.org Git - git/commitdiff
hook: use correct logical variable
authorKaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Mon, 14 Aug 2017 08:46:46 +0000 (14:16 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Aug 2017 18:19:50 +0000 (11:19 -0700)
Sign-off added should be that of the "committer", not that of the
"commit's author"; that is how the rest of Git adds sign-off using
sequencer.c::append_signoff().

Use the correct logical variable that identifies the committer.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
templates/hooks--prepare-commit-msg.sample

index dc707e46eb86e6aa78487447d7f2c19fd3077c87..318afe3fd865013e668fcd8a2213bc5567b46579 100755 (executable)
@@ -34,7 +34,7 @@ SHA1=$3
 #  *) ;;
 # esac
 
-# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
 # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
 # if test -z "$COMMIT_SOURCE"
 # then