diff mbox series

[18/22] t/t5*: merge a "grep | sed" pipeline

Message ID 20240305212533.12947-19-dev+git@drbeat.li (mailing list archive)
State Superseded
Headers show
Series avoid redundant pipelines | expand

Commit Message

Beat Bolli March 5, 2024, 9:25 p.m. UTC
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
 t/t5401-update-hooks.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Junio C Hamano March 6, 2024, 12:57 a.m. UTC | #1
"Beat Bolli" <bb@drbeat.li> writes:

> Signed-off-by: Beat Bolli <dev+git@drbeat.li>
> ---
>  t/t5401-update-hooks.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
> index 8b8bc47dc0b9..d8cadeec7331 100755
> --- a/t/t5401-update-hooks.sh
> +++ b/t/t5401-update-hooks.sh
> @@ -123,7 +123,7 @@ remote: STDOUT post-update
>  remote: STDERR post-update
>  EOF
>  test_expect_success 'send-pack stderr contains hook messages' '
> -	grep ^remote: send.err | sed "s/ *\$//" >actual &&
> +	sed -n "/^remote:/s/ *\$//p" send.err >actual &&
>  	test_cmp expect actual
>  '

Both 17 & 18 look good.
diff mbox series

Patch

diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
index 8b8bc47dc0b9..d8cadeec7331 100755
--- a/t/t5401-update-hooks.sh
+++ b/t/t5401-update-hooks.sh
@@ -123,7 +123,7 @@  remote: STDOUT post-update
 remote: STDERR post-update
 EOF
 test_expect_success 'send-pack stderr contains hook messages' '
-	grep ^remote: send.err | sed "s/ *\$//" >actual &&
+	sed -n "/^remote:/s/ *\$//p" send.err >actual &&
 	test_cmp expect actual
 '