From 6d69b6f6ac27ab6f71a10da34b813ca25fd2a358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 17 Sep 2007 20:06:45 -0400 Subject: Clean up stripspace a bit, use strbuf even more. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kristian Høgsberg Signed-off-by: Junio C Hamano --- builtin-tag.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'builtin-tag.c') diff --git a/builtin-tag.c b/builtin-tag.c index fcbf9bbf18..6132cac218 100644 --- a/builtin-tag.c +++ b/builtin-tag.c @@ -291,14 +291,11 @@ static void create_tag(const unsigned char *object, const char *tag, free(path); } - strbuf_setlen(buf, stripspace(buf->buf, buf->len, 1)); + stripspace(buf, 1); if (!message && !buf->len) die("no tag message?"); - /* insert the header and add the '\n' if needed: */ - if (buf->len) - strbuf_addch(buf, '\n'); strbuf_insert(buf, 0, header_buf, header_len); if (sign && do_sign(buf) < 0) -- cgit v1.2.3