diff mbox series

[v8,03/15] t1092: replace incorrect 'echo' with 'cat'

Message ID 05981e30b97a3e668b3a9675508135d42f15450f.1626112556.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Sparse-index: integrate with status | expand

Commit Message

Derrick Stolee July 12, 2021, 5:55 p.m. UTC
From: Derrick Stolee <dstolee@microsoft.com>

This fixes the test data shape to be as expected, allowing rename
detection to work properly now that the 'larger-content' file actually
has meaningful lines.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 t/t1092-sparse-checkout-compatibility.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bagas Sanjaya July 14, 2021, 12:02 a.m. UTC | #1
On 13/07/21 00.55, Derrick Stolee via GitGitGadget wrote:
> From: Derrick Stolee <dstolee@microsoft.com>
> 
> This fixes the test data shape to be as expected, allowing rename
> detection to work properly now that the 'larger-content' file actually
> has meaningful lines.
> 

What's the connection with s/echo/cat/ ?

> @@ -40,7 +40,7 @@ test_expect_success 'setup' '
>   		done &&
>   
>   		git checkout -b rename-base base &&
> -		echo >folder1/larger-content <<-\EOF &&
> +		cat >folder1/larger-content <<-\EOF &&
>   		matching
>   		lines
>   		help
> 

OK, because to write multi-line file in scripts one must use cat, while 
echo can only write single line.
diff mbox series

Patch

diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh
index b8617ceef71..87f1014a1c9 100755
--- a/t/t1092-sparse-checkout-compatibility.sh
+++ b/t/t1092-sparse-checkout-compatibility.sh
@@ -40,7 +40,7 @@  test_expect_success 'setup' '
 		done &&
 
 		git checkout -b rename-base base &&
-		echo >folder1/larger-content <<-\EOF &&
+		cat >folder1/larger-content <<-\EOF &&
 		matching
 		lines
 		help