diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-09-17 20:06:45 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-27 00:33:33 -0700 |
commit | 6d69b6f6ac27ab6f71a10da34b813ca25fd2a358 (patch) | |
tree | 9e581e5453aa5b43109e5c2eed57e892352e1ac4 /builtin-tag.c | |
parent | a9390b9fcefb18c4ccdb521086a051bc9112e03d (diff) | |
download | git-6d69b6f6ac27ab6f71a10da34b813ca25fd2a358.tar.gz |
Clean up stripspace a bit, use strbuf even more.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-tag.c')
-rw-r--r-- | builtin-tag.c | 5 |
1 files changed, 1 insertions, 4 deletions
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) |