diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-12-02 13:43:34 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-02 23:35:46 -0800 |
commit | d9ccfe7711a8bf1ed9d9cd87daa9863e0d564b23 (patch) | |
tree | 61fbb63b219435a6026f1cb8c436a32d975895a1 /builtin-commit.c | |
parent | b5b644a93adb41bca590a3cdfd9b64ccf3614f50 (diff) | |
download | git-d9ccfe7711a8bf1ed9d9cd87daa9863e0d564b23.tar.gz |
Fix --signoff in builtin-commit differently.
Introduce fmt_name() specifically meant for formatting the name and
email pair, to add signed-off-by value. This reverts parts of
13208572fbe8838fd8835548d7502202d1f7b21d (builtin-commit: fix --signoff)
so that an empty datestamp string given to fmt_ident() by mistake will
error out as before.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r-- | builtin-commit.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 6c1ace32a4..05594f2b13 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -346,11 +346,9 @@ static int prepare_log_message(const char *index_file, const char *prefix) strbuf_init(&sob, 0); strbuf_addstr(&sob, sign_off_header); - strbuf_addstr(&sob, fmt_ident(getenv("GIT_COMMITTER_NAME"), - getenv("GIT_COMMITTER_EMAIL"), - "", 1)); + strbuf_addstr(&sob, fmt_name(getenv("GIT_COMMITTER_NAME"), + getenv("GIT_COMMITTER_EMAIL"))); strbuf_addch(&sob, '\n'); - for (i = sb.len - 1; i > 0 && sb.buf[i - 1] != '\n'; i--) ; /* do nothing */ if (prefixcmp(sb.buf + i, sob.buf)) { |