summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-07-25 14:13:47 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-07-25 14:13:47 -0700
commitb4e8a847ba4e775fb7d422b2daf18356db50eec8 (patch)
treeb7beddae0b6b9800c8a40dfc6b4be33764b6a4a6 /dir.c
parentMerge branch 'ew/autoconf-pthread' (diff)
parentstrbuf: avoid calling strbuf_grow() twice in strbuf_addbuf() (diff)
downloadtgif-b4e8a847ba4e775fb7d422b2daf18356db50eec8.tar.xz
Merge branch 'rs/use-strbuf-addbuf'
Code cleanup. * rs/use-strbuf-addbuf: strbuf: avoid calling strbuf_grow() twice in strbuf_addbuf() use strbuf_addbuf() for appending a strbuf to another
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 6172b3438d..0ea235f3d6 100644
--- a/dir.c
+++ b/dir.c
@@ -2364,7 +2364,7 @@ void write_untracked_extension(struct strbuf *out, struct untracked_cache *untra
varint_len = encode_varint(untracked->ident.len, varbuf);
strbuf_add(out, varbuf, varint_len);
- strbuf_add(out, untracked->ident.buf, untracked->ident.len);
+ strbuf_addbuf(out, &untracked->ident);
strbuf_add(out, ouc, ouc_size(len));
free(ouc);