rm: reuse strbuf for all remove_dir_recursively() calls, again
commit590fc05293964160e4360431950325658d75fe23
authorRené Scharfe <l.s.r@web.de>
Sat, 11 Feb 2017 19:51:08 +0000 (11 20:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Feb 2017 22:33:32 +0000 (13 14:33 -0800)
tree1ab99d1530f074adba624c27fe711145bf9012b5
parent3ccd681c2ab11522591be8a7a3eddb1a85a43ab0
rm: reuse strbuf for all remove_dir_recursively() calls, again

Don't throw the memory allocated for remove_dir_recursively() away after
a single call, use it for the other entries as well instead.

This change was done before in deb8e15a (rm: reuse strbuf for all
remove_dir_recursively() calls), but was reverted as a side-effect of
55856a35 (rm: absorb a submodules git dir before deletion). Reinstate
the optimization.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rm.c