All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts
@ 2026-10-18  4:55 Srujith A Poojary via GitGitGadget
  2026-10-21 22:03 ` Usman Akinyemi
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Srujith A Poojary via GitGitGadget @ 2026-10-18  4:55 UTC (permalink / raw)
  To: git; +Cc: Srujith A Poojary, Srujith Poojary

From: Srujith Poojary <poojarysrujith@gmail.com>

Avoid piping output from git version directly into sed to ensure

that any command failure is properly caught by test scripts.

Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
---
    [Outreachy PATCH] t0001: avoid pipes in test scripts

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2260

 t/t0001-init.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index f1d227f271..e835afee68 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -678,7 +678,7 @@ test_expect_success 'default ref format' '
 		sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
 		git init refformat
 	) &&
-	git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
+	git version --build-options >build-options && sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
 	git -C refformat rev-parse --show-ref-storage-format >actual &&
 	test_cmp expect actual
 '

base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-18  4:55 [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts Srujith A Poojary via GitGitGadget
@ 2026-10-21 22:03 ` Usman Akinyemi
  2026-10-22 10:50 ` [PATCH v2] " Srujith A Poojary via GitGitGadget
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Usman Akinyemi @ 2026-10-21 22:03 UTC (permalink / raw)
  To: Srujith A Poojary via GitGitGadget; +Cc: git, Srujith A Poojary

> diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> index f1d227f271..e835afee68 100755
> --- a/t/t0001-init.sh
> +++ b/t/t0001-init.sh
> @@ -678,7 +678,7 @@ test_expect_success 'default ref format' '
>                 sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
>                 git init refformat
>         ) &&
> -       git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
> +       git version --build-options >build-options && sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
We can put this in two lines, something like this:

               git version --build-options >build-options &&
               sed -ne "s/^default-ref-storage-format: //p"
build-options >expect &&

>         git -C refformat rev-parse --show-ref-storage-format >actual &&

Thanks for the patch.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-18  4:55 [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts Srujith A Poojary via GitGitGadget
  2026-10-21 22:03 ` Usman Akinyemi
@ 2026-10-22 10:50 ` Srujith A Poojary via GitGitGadget
  2026-10-22 10:53   ` Srujith Poojary
  2026-10-22 17:24   ` Junio C Hamano
  2026-10-23  5:13 ` [PATCH v3] " Srujith A Poojary via GitGitGadget
  2026-10-29 14:34 ` [PATCH v4] " Srujith A Poojary via GitGitGadget
  3 siblings, 2 replies; 11+ messages in thread
From: Srujith A Poojary via GitGitGadget @ 2026-10-22 10:50 UTC (permalink / raw)
  To: git; +Cc: Usman Akinyemi, Srujith A Poojary, Srujith Poojary

From: Srujith Poojary <poojarysrujith@gmail.com>

Avoid piping output from git version directly into sed to ensure

that any command failure is properly caught by test scripts.

Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
---
    [Outreachy PATCH] t0001: avoid pipes in test scripts

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/2260

Range-diff vs v1:

 1:  92ecaec2cd ! 1:  7d118290ce [Outreachy PATCH] t0001: avoid pipes in test scripts
     @@ t/t0001-init.sh: test_expect_success 'default ref format' '
       		git init refformat
       	) &&
      -	git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
     -+	git version --build-options >build-options && sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
     ++	git version --build-options >build-options &&
     ++		sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
       	git -C refformat rev-parse --show-ref-storage-format >actual &&
       	test_cmp expect actual
       '


 t/t0001-init.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index f1d227f271..02217a9bf8 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
 		sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
 		git init refformat
 	) &&
-	git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
+	git version --build-options >build-options &&
+		sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
 	git -C refformat rev-parse --show-ref-storage-format >actual &&
 	test_cmp expect actual
 '

base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-22 10:50 ` [PATCH v2] " Srujith A Poojary via GitGitGadget
@ 2026-10-22 10:53   ` Srujith Poojary
  2026-10-22 17:24   ` Junio C Hamano
  1 sibling, 0 replies; 11+ messages in thread
From: Srujith Poojary @ 2026-10-22 10:53 UTC (permalink / raw)
  To: Srujith A Poojary via GitGitGadget; +Cc: git, Usman Akinyemi

Hi Usman,

Thanks for the suggestion! I have updated the script to split the
command into two separate lines as recommended and resolved a trailing
whitespace issue.
I've submitted v2 of the patch to the mailing list via GitGitGadget.

Best regards,
Srujith

On Thu, Oct 22, 2026 at 4:20 PM Srujith A Poojary via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Srujith Poojary <poojarysrujith@gmail.com>
>
> Avoid piping output from git version directly into sed to ensure
>
> that any command failure is properly caught by test scripts.
>
> Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
> ---
>     [Outreachy PATCH] t0001: avoid pipes in test scripts
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v2
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v2
> Pull-Request: https://github.com/gitgitgadget/git/pull/2260
>
> Range-diff vs v1:
>
>  1:  92ecaec2cd ! 1:  7d118290ce [Outreachy PATCH] t0001: avoid pipes in test scripts
>      @@ t/t0001-init.sh: test_expect_success 'default ref format' '
>                 git init refformat
>         ) &&
>       - git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
>      -+ git version --build-options >build-options && sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
>      ++ git version --build-options >build-options &&
>      ++         sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
>         git -C refformat rev-parse --show-ref-storage-format >actual &&
>         test_cmp expect actual
>        '
>
>
>  t/t0001-init.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> index f1d227f271..02217a9bf8 100755
> --- a/t/t0001-init.sh
> +++ b/t/t0001-init.sh
> @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
>                 sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
>                 git init refformat
>         ) &&
> -       git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
> +       git version --build-options >build-options &&
> +               sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
>         git -C refformat rev-parse --show-ref-storage-format >actual &&
>         test_cmp expect actual
>  '
>
> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
> --
> gitgitgadget

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-22 10:50 ` [PATCH v2] " Srujith A Poojary via GitGitGadget
  2026-10-22 10:53   ` Srujith Poojary
@ 2026-10-22 17:24   ` Junio C Hamano
  2026-10-23  4:34     ` Srujith Poojary
  1 sibling, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2026-10-22 17:24 UTC (permalink / raw)
  To: Srujith A Poojary via GitGitGadget; +Cc: git, Usman Akinyemi, Srujith A Poojary

"Srujith A Poojary via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> From: Srujith Poojary <poojarysrujith@gmail.com>
>
> Avoid piping output from git version directly into sed to ensure
>
> that any command failure is properly caught by test scripts.
>
> Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
> ---

You do not want a blank line in the middle of a sentence.

> diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> index f1d227f271..02217a9bf8 100755
> --- a/t/t0001-init.sh
> +++ b/t/t0001-init.sh
> @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
>  		sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
>  		git init refformat
>  	) &&
> -	git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
> +	git version --build-options >build-options &&
> +		sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&

Unnecessary indentation.  The only reason why you thought it was
needed was because the original was (wrongly) expressed as a single
pipeline.  Once that glitch is gone, anybody reading the resulting
code has no reason to think that this "sed" is associated stronger
to the previous "git version" than with the next "git rev-parse"
line.

>  	git -C refformat rev-parse --show-ref-storage-format >actual &&
>  	test_cmp expect actual
>  '
>
> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-22 17:24   ` Junio C Hamano
@ 2026-10-23  4:34     ` Srujith Poojary
  0 siblings, 0 replies; 11+ messages in thread
From: Srujith Poojary @ 2026-10-23  4:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Srujith A Poojary via GitGitGadget, git, Usman Akinyemi

Hi Junio,

Thanks for pointing that out! I've removed the extra indentation in v3
so the sed line aligns properly with the surrounding commands.

Best,
Srujith


On Thu, Oct 22, 2026 at 10:54 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> "Srujith A Poojary via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > From: Srujith Poojary <poojarysrujith@gmail.com>
> >
> > Avoid piping output from git version directly into sed to ensure
> >
> > that any command failure is properly caught by test scripts.
> >
> > Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
> > ---
>
> You do not want a blank line in the middle of a sentence.
>
> > diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> > index f1d227f271..02217a9bf8 100755
> > --- a/t/t0001-init.sh
> > +++ b/t/t0001-init.sh
> > @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
> >               sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
> >               git init refformat
> >       ) &&
> > -     git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
> > +     git version --build-options >build-options &&
> > +             sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
>
> Unnecessary indentation.  The only reason why you thought it was
> needed was because the original was (wrongly) expressed as a single
> pipeline.  Once that glitch is gone, anybody reading the resulting
> code has no reason to think that this "sed" is associated stronger
> to the previous "git version" than with the next "git rev-parse"
> line.
>
> >       git -C refformat rev-parse --show-ref-storage-format >actual &&
> >       test_cmp expect actual
> >  '
> >
> > base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-18  4:55 [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts Srujith A Poojary via GitGitGadget
  2026-10-21 22:03 ` Usman Akinyemi
  2026-10-22 10:50 ` [PATCH v2] " Srujith A Poojary via GitGitGadget
@ 2026-10-23  5:13 ` Srujith A Poojary via GitGitGadget
  2026-10-23 16:23   ` Srujith Poojary
  2026-10-29 12:12   ` Patrick Steinhardt
  2026-10-29 14:34 ` [PATCH v4] " Srujith A Poojary via GitGitGadget
  3 siblings, 2 replies; 11+ messages in thread
From: Srujith A Poojary via GitGitGadget @ 2026-10-23  5:13 UTC (permalink / raw)
  To: git; +Cc: Usman Akinyemi, Srujith A Poojary, Srujith Poojary

From: Srujith Poojary <poojarysrujith@gmail.com>

Avoid piping output from git version directly into sed to ensure

that any command failure is properly caught by test scripts.

Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
---
    [Outreachy PATCH] t0001: avoid pipes in test scripts

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/2260

Range-diff vs v2:

 1:  7d118290ce ! 1:  a70ccdf49e [Outreachy PATCH] t0001: avoid pipes in test scripts
     @@ t/t0001-init.sh: test_expect_success 'default ref format' '
       	) &&
      -	git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
      +	git version --build-options >build-options &&
     -+		sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
     ++	sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
       	git -C refformat rev-parse --show-ref-storage-format >actual &&
       	test_cmp expect actual
       '


 t/t0001-init.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index f1d227f271..c8c74f681b 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
 		sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
 		git init refformat
 	) &&
-	git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
+	git version --build-options >build-options &&
+	sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
 	git -C refformat rev-parse --show-ref-storage-format >actual &&
 	test_cmp expect actual
 '

base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-23  5:13 ` [PATCH v3] " Srujith A Poojary via GitGitGadget
@ 2026-10-23 16:23   ` Srujith Poojary
  2026-10-29 12:12   ` Patrick Steinhardt
  1 sibling, 0 replies; 11+ messages in thread
From: Srujith Poojary @ 2026-10-23 16:23 UTC (permalink / raw)
  To: Srujith A Poojary via GitGitGadget, Junio C Hamano; +Cc: git, Usman Akinyemi

Hi,

I have submitted v3 of the t0001 patch to the mailing list.
Just a quick note on the CI: there is a single failure in win test
(5), but it is caused by t1051-large-conversion running out of memory
during a 5GB conversion test, which is unrelated to the t0001 changes.

The patch is ready for review.

Best regards,
Srujith



On Fri, Oct 23, 2026 at 10:43 AM Srujith A Poojary via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Srujith Poojary <poojarysrujith@gmail.com>
>
> Avoid piping output from git version directly into sed to ensure
>
> that any command failure is properly caught by test scripts.
>
> Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
> ---
>     [Outreachy PATCH] t0001: avoid pipes in test scripts
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v3
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v3
> Pull-Request: https://github.com/gitgitgadget/git/pull/2260
>
> Range-diff vs v2:
>
>  1:  7d118290ce ! 1:  a70ccdf49e [Outreachy PATCH] t0001: avoid pipes in test scripts
>      @@ t/t0001-init.sh: test_expect_success 'default ref format' '
>         ) &&
>       - git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
>       + git version --build-options >build-options &&
>      -+         sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
>      ++ sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
>         git -C refformat rev-parse --show-ref-storage-format >actual &&
>         test_cmp expect actual
>        '
>
>
>  t/t0001-init.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> index f1d227f271..c8c74f681b 100755
> --- a/t/t0001-init.sh
> +++ b/t/t0001-init.sh
> @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
>                 sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
>                 git init refformat
>         ) &&
> -       git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
> +       git version --build-options >build-options &&
> +       sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
>         git -C refformat rev-parse --show-ref-storage-format >actual &&
>         test_cmp expect actual
>  '
>
> base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
> --
> gitgitgadget

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-23  5:13 ` [PATCH v3] " Srujith A Poojary via GitGitGadget
  2026-10-23 16:23   ` Srujith Poojary
@ 2026-10-29 12:12   ` Patrick Steinhardt
  2026-10-29 14:36     ` Srujith Poojary
  1 sibling, 1 reply; 11+ messages in thread
From: Patrick Steinhardt @ 2026-10-29 12:12 UTC (permalink / raw)
  To: Srujith A Poojary via GitGitGadget; +Cc: git, Usman Akinyemi, Srujith A Poojary

On Fri, Oct 23, 2026 at 05:13:08AM +0000, Srujith A Poojary via GitGitGadget wrote:
> From: Srujith Poojary <poojarysrujith@gmail.com>
> 
> Avoid piping output from git version directly into sed to ensure
> 
> that any command failure is properly caught by test scripts.

Formatting of your commit message is off a bit with an empty line in
the middle of the sentence.

> diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> index f1d227f271..c8c74f681b 100755
> --- a/t/t0001-init.sh
> +++ b/t/t0001-init.sh
> @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
>  		sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
>  		git init refformat
>  	) &&
> -	git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
> +	git version --build-options >build-options &&
> +	sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
>  	git -C refformat rev-parse --show-ref-storage-format >actual &&
>  	test_cmp expect actual
>  '

The changes look good to me though. Thanks!

Patrick

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v4] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-18  4:55 [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts Srujith A Poojary via GitGitGadget
                   ` (2 preceding siblings ...)
  2026-10-23  5:13 ` [PATCH v3] " Srujith A Poojary via GitGitGadget
@ 2026-10-29 14:34 ` Srujith A Poojary via GitGitGadget
  3 siblings, 0 replies; 11+ messages in thread
From: Srujith A Poojary via GitGitGadget @ 2026-10-29 14:34 UTC (permalink / raw)
  To: git; +Cc: Usman Akinyemi, Patrick Steinhardt, Srujith A Poojary,
	Srujith Poojary

From: Srujith Poojary <poojarysrujith@gmail.com>

Avoid piping output from git version directly into sed to ensure
that any command failure is properly caught by test scripts.

Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
---
    [Outreachy PATCH] t0001: avoid pipes in test scripts

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2260%2Fpoojarysrujith%2Fmicroproject-init-pipe-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2260/poojarysrujith/microproject-init-pipe-v4
Pull-Request: https://github.com/gitgitgadget/git/pull/2260

Range-diff vs v3:

 1:  a70ccdf49e ! 1:  4373eef413 [Outreachy PATCH] t0001: avoid pipes in test scripts
     @@ Commit message
          [Outreachy PATCH] t0001: avoid pipes in test scripts
      
          Avoid piping output from git version directly into sed to ensure
     -
          that any command failure is properly caught by test scripts.
      
          Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>


 t/t0001-init.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index f1d227f271..c8c74f681b 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
 		sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
 		git init refformat
 	) &&
-	git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
+	git version --build-options >build-options &&
+	sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
 	git -C refformat rev-parse --show-ref-storage-format >actual &&
 	test_cmp expect actual
 '

base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts
  2026-10-29 12:12   ` Patrick Steinhardt
@ 2026-10-29 14:36     ` Srujith Poojary
  0 siblings, 0 replies; 11+ messages in thread
From: Srujith Poojary @ 2026-10-29 14:36 UTC (permalink / raw)
  To: Patrick Steinhardt
  Cc: Srujith A Poojary via GitGitGadget, git, Usman Akinyemi,
	Junio C Hamano

On Thu, Oct 29, 2026 at 5:42 PM Patrick Steinhardt <ps@pks.im> wrote:
>
> On Fri, Oct 23, 2026 at 05:13:08AM +0000, Srujith A Poojary via GitGitGadget wrote:
> > From: Srujith Poojary <poojarysrujith@gmail.com>
> >
> > Avoid piping output from git version directly into sed to ensure
> >
> > that any command failure is properly caught by test scripts.
>
> Formatting of your commit message is off a bit with an empty line in
> the middle of the sentence.
>
> > diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> > index f1d227f271..c8c74f681b 100755
> > --- a/t/t0001-init.sh
> > +++ b/t/t0001-init.sh
> > @@ -678,7 +678,8 @@ test_expect_success 'default ref format' '
> >               sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
> >               git init refformat
> >       ) &&
> > -     git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
> > +     git version --build-options >build-options &&
> > +     sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
> >       git -C refformat rev-parse --show-ref-storage-format >actual &&
> >       test_cmp expect actual
> >  '
>
> The changes look good to me though. Thanks!
>
> Patrick

Hi Patrick,

Thank you for reviewing! Good catch—I've removed the empty line in the
commit message and submitted the updated version.

Best regards,
Srujith

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-10-29 14:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18  4:55 [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts Srujith A Poojary via GitGitGadget
2026-10-21 22:03 ` Usman Akinyemi
2026-10-22 10:50 ` [PATCH v2] " Srujith A Poojary via GitGitGadget
2026-10-22 10:53   ` Srujith Poojary
2026-10-22 17:24   ` Junio C Hamano
2026-10-23  4:34     ` Srujith Poojary
2026-10-23  5:13 ` [PATCH v3] " Srujith A Poojary via GitGitGadget
2026-10-23 16:23   ` Srujith Poojary
2026-10-29 12:12   ` Patrick Steinhardt
2026-10-29 14:36     ` Srujith Poojary
2026-10-29 14:34 ` [PATCH v4] " Srujith A Poojary via GitGitGadget

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.