replace strbuf_addstr(git_path()) with git_path_buf()
commit8c2ca3a6d6d0bf51332f92d25b7902f9943aaaf2
authorJeff King <peff@peff.net>
Thu, 20 Apr 2017 21:09:30 +0000 (20 17:09 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Apr 2017 04:04:20 +0000 (20 21:04 -0700)
tree239417b4ea3d79c3fb2561a6c28d8f367bb6508c
parentd9c69644b27eb59fe16c1931580e6fce4abbdc65
replace strbuf_addstr(git_path()) with git_path_buf()

Writing directly into the strbuf avoids a useless copy of
the data, and dropping calls to git_path() makes it easier
to audit for dangerous calls.

Note that git_path() does an implicit strbuf_reset(), but in
each of these cases we were either already doing that reset,
or writing into a fresh strbuf anyway.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/worktree.c
notes-merge.c