Skip to content

Commit 030a3d5

Browse files
avargitster
authored andcommitted
ls-tree: use a "struct options"
As a first step towards being able to turn this code into an API some day let's change the "static" options in builtin/ls-tree.c into a "struct ls_tree_options" that can be constructed dynamically without the help of parse_options(). Because we're now using non-static variables for this we'll need to clear_pathspec() at the end of cmd_ls_tree(), least various tests start failing under SANITIZE=leak. The memory leak was already there before, now it's just being brought to the surface. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Teng Long <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7677417 commit 030a3d5

File tree

1 file changed

+116
-87
lines changed

1 file changed

+116
-87
lines changed

0 commit comments

Comments
 (0)