summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 85c278afab..dc0fc3b679 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -442,8 +442,11 @@ fi | git-stripspace >"$GIT_DIR"/COMMIT_EDITMSG
case "$signoff" in
t)
+ need_blank_before_signoff=
+ tail -n 1 "$GIT_DIR"/COMMIT_EDITMSG |
+ grep 'Signed-off-by:' >/dev/null || need_blank_before_signoff=yes
{
- echo
+ test -z "$need_blank_before_signoff" || echo
git-var GIT_COMMITTER_IDENT | sed -e '
s/>.*/>/
s/^/Signed-off-by: /