From: Kaartic Sivaraam Date: Mon, 14 Aug 2017 08:46:46 +0000 (+0530) Subject: hook: use correct logical variable X-Git-Tag: v2.15.0-rc0~152^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51f5a2b4394c741433f11d54aa3f0ac2c4a647b6;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/templates/hooks--prepare-commit-msg.sample b/templates/hooks--prepare-commit-msg.sample index dc707e46eb..318afe3fd8 100755 --- a/templates/hooks--prepare-commit-msg.sample +++ b/templates/hooks--prepare-commit-msg.sample @@ -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