On Sun, Oct 6, 2024 at 5:55 AM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > > On Sun, Oct 6, 2024 at 1:33 AM Usman Akinyemi via GitGitGadget > <gitgitgadget@xxxxxxxxx> wrote: > > The exit code of the preceding command in a pipe is disregarded. So > > if that preceding command is a Git command that fails, the test would > > not fail. Instead, by saving the output of that Git command to a file, > > and removing the pipe, we make sure the test will fail if that Git > > command fails. > > Okay, makes sense. > > One minor style comment below... > > > Signed-off-by: Usman Akinyemi <usmanakinyemi202@xxxxxxxxx> > > --- > > diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh > > @@ -470,10 +481,10 @@ test_expect_success 'squash and fixup generate correct log messages' ' > > - git cat-file commit HEAD@{2} | > > - grep "^# This is a combination of 3 commits\." && > > - git cat-file commit HEAD@{3} | > > - grep "^# This is a combination of 2 commits\." && > > + git cat-file commit HEAD@{2} >actual && > > + grep "^# This is a combination of 3 commits\." actual && > > + git cat-file commit HEAD@{3} >actual && > > + grep "^# This is a combination of 2 commits\." actual && > > We wouldn't normally indent the `grep` line like this. Now that you've > dropped the patch, it would be best to lose the extra indentation, as > well: > > git cat-file commit HEAD@{2} >actual && > grep "^# This is a combination of 3 commits\." actual && > ... Noted and thanks.