hook: use correct logical variable

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>
This commit is contained in:
Kaartic Sivaraam 2017-08-14 14:16:46 +05:30 committed by Junio C Hamano
parent 0ef1a4e32a
commit 51f5a2b439

View File

@ -34,7 +34,7 @@ SHA1=$3
# *) ;; # *) ;;
# esac # 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" # git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
# if test -z "$COMMIT_SOURCE" # if test -z "$COMMIT_SOURCE"
# then # then