提交 dbaa06a2 编写于 作者: J Junio C Hamano

git-commit -s: no extra space when sign-offs appear at the end already.

Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 def2747d
......@@ -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: /
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册