Commit c5fdccbf542b4d88db2f794fe6e81a7fc35c0b59

Yang Zhong 2020-12-10T08:08:42

fix expected output of test_tree_submodule_of_same_repo for packed repos

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/regress/cmdline/tree.sh b/regress/cmdline/tree.sh
index 68b58e3..55ebc6f 100755
--- a/regress/cmdline/tree.sh
+++ b/regress/cmdline/tree.sh
@@ -123,7 +123,13 @@ test_tree_submodule_of_same_repo() {
 		test_done "$testroot" "1"
 		return 1
 	fi
-	echo "got-read-tree: bad object data" > $testroot/stderr.expected
+	if [ -n "$GOT_TEST_PACK" ]; then
+		echo "got-read-pack: bad object data" \
+			> $testroot/stderr.expected
+	else
+		echo "got-read-tree: bad object data" \
+			> $testroot/stderr.expected
+	fi
 	echo "got: bad object data" >> $testroot/stderr.expected
 
 	cmp -s $testroot/stderr.expected $testroot/stderr