diff mbox series

[v3,02/10] cache-tree tests: remove unused $2 parameter

Message ID 20210123130046.21975-3-avarab@gmail.com (mailing list archive)
State Accepted
Commit 32267255070604efe0672793a1bbb797558765bc
Headers show
Series [v3,01/10] cache-tree tests: refactor for modern test style | expand

Commit Message

Ævar Arnfjörð Bjarmason Jan. 23, 2021, 1 p.m. UTC
Remove the $2 paramater. This appears to have been some
work-in-progress code from an earlier version of
9c4d6c0297 (cache-tree: Write updated cache-tree after commit,
2014-07-13) which was left in the final version.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t0090-cache-tree.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Junio C Hamano Jan. 23, 2021, 9:35 p.m. UTC | #1
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Remove the $2 paramater. This appears to have been some
> work-in-progress code from an earlier version of
> 9c4d6c0297 (cache-tree: Write updated cache-tree after commit,
> 2014-07-13) which was left in the final version.

Good.
diff mbox series

Patch

diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh
index 45e1cc82ed..7ff7f04719 100755
--- a/t/t0090-cache-tree.sh
+++ b/t/t0090-cache-tree.sh
@@ -19,7 +19,6 @@  cmp_cache_tree () {
 # correct.
 generate_expected_cache_tree_rec () {
 	dir="$1${1:+/}" &&
-	parent="$2" &&
 	# ls-files might have foo/bar, foo/bar/baz, and foo/bar/quux
 	# We want to count only foo because it's the only direct child
 	git ls-files >files &&
@@ -30,10 +29,9 @@  generate_expected_cache_tree_rec () {
 	for subtree in $subtrees
 	do
 		cd "$subtree"
-		generate_expected_cache_tree_rec "$dir$subtree" "$dir" || return 1
+		generate_expected_cache_tree_rec "$dir$subtree" || return 1
 		cd ..
-	done &&
-	dir=$parent
+	done
 }
 
 generate_expected_cache_tree () {