Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-07-19 21:36:29 +0300
committerJunio C Hamano <gitster@pobox.com>2016-07-19 21:48:35 +0300
commit8109984d619467ad26c6a76d59b0a5de8a86e6d6 (patch)
treebf026f0165f1b8268089c4ec0e0bb402e3a6ee15 /dir.c
parente46579643d56162299b1756b70d418005351b256 (diff)
use strbuf_addbuf() for appending a strbuf to another
Use strbuf_addbuf() where possible; it's shorter and more efficient. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 88e89585eb1..05b98843ee3 100644
--- a/dir.c
+++ b/dir.c
@@ -2346,7 +2346,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);