On Fri, Jan 31, 2025 at 5:53 AM Patrick Steinhardt <ps@xxxxxx> wrote: > We have several heredocs in t5504 located outside of any particular test > bodies. Move these into the test bodies to match our modern coding > style. > > Signed-off-by: Patrick Steinhardt <ps@xxxxxx> > --- > diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh > @@ -64,12 +64,6 @@ test_expect_success 'fetch with transfer.fsckobjects' ' > -cat >exp <<EOF > -To dst > -! refs/heads/main:refs/heads/test [remote rejected] (missing necessary objects) > -Done > -EOF > - > test_expect_success 'push without strict' ' > @@ -78,6 +72,11 @@ test_expect_success 'push without strict' ' > + cat >exp <<-EOF && > + To dst > + ! refs/heads/main:refs/heads/test [remote rejected] (missing necessary objects) > + Done > + EOF It's minor, but to make this conform to modern style even more, it would use `\EOF` rather than `EOF`. (Probably not worth a reroll on its own.) > @@ -94,11 +93,6 @@ test_expect_success 'push with !receive.fsckobjects' ' > -cat >exp <<EOF > -To dst > -! refs/heads/main:refs/heads/test [remote rejected] (unpacker error) > -EOF > - > test_expect_success 'push with receive.fsckobjects' ' > @@ -107,6 +101,10 @@ test_expect_success 'push with receive.fsckobjects' ' > + cat >exp <<-EOF && > + To dst > + ! refs/heads/main:refs/heads/test [remote rejected] (unpacker error) > + EOF Ditto. > @@ -129,15 +127,14 @@ test_expect_success 'repair the "corrupt or missing" object' ' > -cat >bogus-commit <<EOF > -tree $EMPTY_TREE > -author Bugs Bunny 1234567890 +0000 > -committer Bugs Bunny <bugs@xxxxxx> 1234567890 +0000 > - > -This commit object intentionally broken > -EOF > - > test_expect_success 'setup bogus commit' ' > + cat >bogus-commit <<-EOF && > + tree $EMPTY_TREE > + author Bugs Bunny 1234567890 +0000 > + committer Bugs Bunny <bugs@xxxxxx> 1234567890 +0000 > + > + This commit object intentionally broken > + EOF This one is correctly using `EOF` since it's interpolating variables.