Thread View: linux.kernel.git
11 messages
11 total messages
Started by "Srujith A Poojary via GitGitGad...
Sun, 18 Oct 2026 04:55
[PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: "Srujith A Poojary via GitGitGad...
Date: Sun, 18 Oct 2026 04:55
Date: Sun, 18 Oct 2026 04:55
35 lines
8947 bytes
8947 bytes
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
Re: [PATCH] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: Usman Akinyemi
Date: Wed, 21 Oct 2026 22:03
Date: Wed, 21 Oct 2026 22:03
20 lines
12273 bytes
12273 bytes
> 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.
[PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: "Srujith A Poojary via GitGitGad...
Date: Thu, 22 Oct 2026 10:50
Date: Thu, 22 Oct 2026 10:50
51 lines
12677 bytes
12677 bytes
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
Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: Srujith Poojary
Date: Thu, 22 Oct 2026 10:53
Date: Thu, 22 Oct 2026 10:53
72 lines
14275 bytes
14275 bytes
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
Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: Junio C Hamano
Date: Thu, 22 Oct 2026 17:24
Date: Thu, 22 Oct 2026 17:24
39 lines
14034 bytes
14034 bytes
"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
Re: [PATCH v2] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: Srujith Poojary
Date: Fri, 23 Oct 2026 04:34
Date: Fri, 23 Oct 2026 04:34
53 lines
13736 bytes
13736 bytes
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
[PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: "Srujith A Poojary via GitGitGad...
Date: Fri, 23 Oct 2026 05:13
Date: Fri, 23 Oct 2026 05:13
50 lines
12574 bytes
12574 bytes
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
Re: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: Srujith Poojary
Date: Fri, 23 Oct 2026 16:23
Date: Fri, 23 Oct 2026 16:23
75 lines
14366 bytes
14366 bytes
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
[PATCH v4] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: "Srujith A Poojary via GitGitGad...
Date: Thu, 29 Oct 2026 14:34
Date: Thu, 29 Oct 2026 14:34
48 lines
12459 bytes
12459 bytes
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
Re: [PATCH v3] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: Srujith Poojary
Date: Thu, 29 Oct 2026 14:36
Date: Thu, 29 Oct 2026 14:36
44 lines
13410 bytes
13410 bytes
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
Re: [PATCH v4] [Outreachy PATCH] t0001: avoid pipes in test scripts
Author: Srujith Poojary
Date: Fri, 30 Oct 2026 08:05
Date: Fri, 30 Oct 2026 08:05
31 lines
12840 bytes
12840 bytes
On Fri, Oct 30, 2026 at 12:54 PM Patrick Steinhardt <ps@pks.im> wrote: > > On Thu, Oct 29, 2026 at 02:34:23PM +0000, Srujith A Poojary via GitGitGadget wrote: > > 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> > > Thanks, this version looks good to me. > > Patrick Hi Patrick, Thank you for the review and guidance throughout this patch! Best regards, Srujith
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads