Commit 88ba84836c92b3f3755bf4e36d7acf782a753b71

Stefan Sperling 2021-07-03T19:51:55

ls -1 is a no-op when stdout is redirected to a file; pointed out by naddy

diff --git a/regress/cmdline/cleanup.sh b/regress/cmdline/cleanup.sh
index 2cd63ed..c3bf21f 100755
--- a/regress/cmdline/cleanup.sh
+++ b/regress/cmdline/cleanup.sh
@@ -67,7 +67,7 @@ test_cleanup_unreferenced_loose_objects() {
 	got ref -r $testroot/repo -d "refs/got/worktree/base-$wt_uuid"
 
 	# cleanup -n should not remove any objects
-	ls -1 -R $testroot/repo/.git/objects > $testroot/objects-before
+	ls -R $testroot/repo/.git/objects > $testroot/objects-before
 	gotadmin cleanup -n -q -r $testroot/repo > $testroot/stdout
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout.expected $testroot/stdout
@@ -77,7 +77,7 @@ test_cleanup_unreferenced_loose_objects() {
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	ls -1 -R $testroot/repo/.git/objects > $testroot/objects-after
+	ls -R $testroot/repo/.git/objects > $testroot/objects-after
 	cmp -s $testroot/objects-before $testroot/objects-after
 	ret="$?"
 	if [ "$ret" != "0" ]; then
@@ -164,7 +164,7 @@ test_cleanup_redundant_loose_objects() {
 	fi
 
 	# cleanup -n should not remove any objects
-	ls -1 -R $testroot/repo/.git/objects > $testroot/objects-before
+	ls -R $testroot/repo/.git/objects > $testroot/objects-before
 	gotadmin cleanup -n -q -r $testroot/repo > $testroot/stdout
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout.expected $testroot/stdout
@@ -174,7 +174,7 @@ test_cleanup_redundant_loose_objects() {
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	ls -1 -R $testroot/repo/.git/objects > $testroot/objects-after
+	ls -R $testroot/repo/.git/objects > $testroot/objects-after
 	cmp -s $testroot/objects-before $testroot/objects-after
 	ret="$?"
 	if [ "$ret" != "0" ]; then