]> git.ipfire.org Git - thirdparty/git.git/commit
archive: stop passing "stage" through read_tree_recursive()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 20 Mar 2021 22:37:49 +0000 (23:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 20 Mar 2021 23:09:26 +0000 (16:09 -0700)
commit7367d88261e5df7b1458cc02217f0e302bc2e127
treeec1377fff591706015667178481dfb1afa841b70
parent9614ad3ce09937f3124db09cc8c6dd2777a15515
archive: stop passing "stage" through read_tree_recursive()

The "stage" variable being passed around in the archive code has only
ever been an elaborate way to hardcode the value "0".

This code was added in its original form in e4fbbfe9ecc (Add
git-zip-tree, 2006-08-26), at which point a hardcoded "0" would be
passed down through read_tree_recursive() to write_zip_entry().

It was then diligently added to the "struct directory" in
ed22b4173bd (archive: support filtering paths with glob, 2014-09-21),
but we were still not doing anything except passing it around as-is.

Let's stop doing that in the code internal to archive.c, we'll still
feed "0" to read_tree_recursive() itself, but won't use it. That we're
providing it at all to read_tree_recursive() will be changed in a
follow-up commit.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive.c