summaryrefslogtreecommitdiff
path: root/builtin-tag.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-09-18 00:06:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-09-27 07:33:33 (GMT)
commit6d69b6f6ac27ab6f71a10da34b813ca25fd2a358 (patch)
tree9e581e5453aa5b43109e5c2eed57e892352e1ac4 /builtin-tag.c
parenta9390b9fcefb18c4ccdb521086a051bc9112e03d (diff)
downloadgit-6d69b6f6ac27ab6f71a10da34b813ca25fd2a358.zip
git-6d69b6f6ac27ab6f71a10da34b813ca25fd2a358.tar.gz
git-6d69b6f6ac27ab6f71a10da34b813ca25fd2a358.tar.bz2
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.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin-tag.c b/builtin-tag.c
index fcbf9bb..6132cac 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)