tree-walk: add a strbuf wrapper for make_traverse_path()
authorJeff King <peff@peff.net>
Wed, 31 Jul 2019 04:38:23 +0000 (00:38 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Aug 2019 20:06:52 +0000 (13:06 -0700)
commitc43ab062598d0299ea6e0d115a6018189a7793bf
tree03abcb873feb9ab6d23d51f9e7f45d1c2b14af26
parentb3b3cbcbf246b1051ad453bc02e24a89573e2911
tree-walk: add a strbuf wrapper for make_traverse_path()

All but one of the callers of make_traverse_path() allocate a new heap
buffer to store the path. Let's give them an easy way to write to a
strbuf, which saves them from computing the length themselves (which is
especially tricky when they want to add to the path). It will also make
it easier for us to change the make_traverse_path() interface in a
future patch to improve its bounds-checking.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/api-tree-walking.txt
builtin/merge-tree.c
tree-walk.c
tree-walk.h
unpack-trees.c