Subject: Re: [PATCH v3 09/10] repack: honor `-l` when calculating pack geometry

From: Junio C Hamano <[email-masked]>
Date: Thu, 13 Apr 2023 08:40:16 -0700

Derrick Stolee <[email-masked]> writes:

>> +	test_line_count = 3 packed-objects &&
>> +	packed_objects member/.git/objects/pack/pack-*.idx >packed-objetcs &&
>
> Typo: s/packed-objetcs/packed-objects/
>
>> +	test_line_count = 3 packed-objects &&

That's a good one.  Because the result file created by the previous
step happens to also have three lines, the typo does not cause the
test to fail, but it is not testing what it designed to test.

Here is "git diff @{1}" after my local "rebase -i" ("diff" of the
result is easier to read than "range-diff" in this case, as I did
not touch any log message).

Thanks for a very good set of eyes.

diff --git c/t/t5331-pack-objects-stdin.sh w/t/t5331-pack-objects-stdin.sh
index 45e24fa94a..acab31667a 100755
--- c/t/t5331-pack-objects-stdin.sh
+++ w/t/t5331-pack-objects-stdin.sh
@@ -7,7 +7,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
-packed_objects() {
+packed_objects () {
 	git show-index <"$1" >tmp-object-list &&
 	cut -d' ' -f2 tmp-object-list | sort &&
 	rm tmp-object-list
diff --git c/t/t7703-repack-geometric.sh w/t/t7703-repack-geometric.sh
index 33d7977fca..57796f3437 100755
--- c/t/t7703-repack-geometric.sh
+++ w/t/t7703-repack-geometric.sh
@@ -10,7 +10,7 @@ objdir=.git/objects
 packdir=$objdir/pack
 midx=$objdir/pack/multi-pack-index
 
-packed_objects() {
+packed_objects () {
 	git show-index <"$1" >tmp-object-list &&
 	cut -d' ' -f2 tmp-object-list &&
 	rm tmp-object-list
@@ -380,7 +380,7 @@ test_expect_success '--geometric -l with non-intact geometric sequence across OD
 	# should have three objects and should be non-equal.
 	packed_objects shared/.git/objects/pack/pack-*.idx >packed-objects &&
 	test_line_count = 3 packed-objects &&
-	packed_objects member/.git/objects/pack/pack-*.idx >packed-objetcs &&
+	packed_objects member/.git/objects/pack/pack-*.idx >packed-objects &&
 	test_line_count = 3 packed-objects &&
 	test "$(basename member/.git/objects/pack/pack-*.pack)" != "$(basename shared/.git/objects/pack/pack-*.pack)" &&