mbox series

[v4,0/8] t7004: Modernize the style

Message ID 20240805235917.190699-1-abdobngad@gmail.com (mailing list archive)
Headers show
Series t7004: Modernize the style | expand

Message

AbdAlRahman Gad Aug. 5, 2024, 11:59 p.m. UTC
- Remove whitespace after the redirect operators.

- Move number of expect files prepared outside of
  test_expect_success to be inside the tests that use it.

- Split some lines that have two commands into two lines
  one command each.

- Turn some "<<\EOF" into "<<-\EOF" and indent their body.

- Avoid using pipes in the output from "test-tool ref-store"
  and write the output to a file.

- Change test_expect_success that are seperated from its name
  to be on the same line.

- Avoid separating test Description and test body with backslash

- Use single quotes instead of double quotes for test description and
  body.

AbdAlRahman Gad (8):
  [Newcomer] t7004: Remove space after redirect operators
  [Newcomer] t7004: Do not lose exit status to pipe
  [Newcomer] t7004: One command per line
  [Newcomer] t7004: Do not prepare things outside test_expect_success
  [Newcomer] t7004: Use indented here-doc
  [Newcomer] t7004: Description on the same line as test_expect_success
  [Newcomer] t7004: Description and test body seperated with backslash
  [Newcomer] t7004: Use single quotes instead of double quotes

 t/t7004-tag.sh | 1154 +++++++++++++++++++++++-------------------------
 1 file changed, 557 insertions(+), 597 deletions(-)


base-commit: 406f326d271e0bacecdb00425422c5fa3f314930

Comments

Junio C Hamano Aug. 6, 2024, 12:45 a.m. UTC | #1
AbdAlRahman Gad <abdobngad@gmail.com> writes:

> AbdAlRahman Gad (8):
>   [Newcomer] t7004: Remove space after redirect operators
>   [Newcomer] t7004: Do not lose exit status to pipe
>   [Newcomer] t7004: One command per line
>   [Newcomer] t7004: Do not prepare things outside test_expect_success
>   [Newcomer] t7004: Use indented here-doc
>   [Newcomer] t7004: Description on the same line as test_expect_success
>   [Newcomer] t7004: Description and test body seperated with backslash
>   [Newcomer] t7004: Use single quotes instead of double quotes

As you can see from "git shortlog --no-merges --since=6.months", we
do not capitalize the first word of the title description of each
patch.

Also, I haven't looked at the individual patches, it seems the patch
is somewhoat whitespace damaged.

    $ git am -s ./+ag8-v4
    Applying: t7004: remove space after redirect operators
    .git/rebase-apply/patch:169: indent with spaces.
            git checkout stable &&
    .git/rebase-apply/patch:193: indent with spaces.
            git tag v4.0
    warning: 2 lines add whitespace errors.
    Applying: t7004: do not lose exit status to pipe
    Applying: t7004: one command per line
    Applying: t7004: do not prepare things outside test_expect_success
    .git/rebase-apply/patch:1188: indent with spaces.
            git tag v4.0
    warning: 1 line adds whitespace errors.
    Applying: t7004: use indented here-doc
    Applying: t7004: description on the same line as test_expect_success
    Applying: t7004: test description and test body seperated with backslash
    Applying: t7004: use single quotes instead of double quotes
    .git/rebase-apply/patch:133: indent with spaces.
            git tag v4.0
    warning: 1 line adds whitespace errors.
AbdAlRahman Gad Aug. 6, 2024, 8:44 a.m. UTC | #2
On 8/6/24 03:45, Junio C Hamano wrote:
> AbdAlRahman Gad <abdobngad@gmail.com> writes:
> 
>> AbdAlRahman Gad (8):
>>    [Newcomer] t7004: Remove space after redirect operators
>>    [Newcomer] t7004: Do not lose exit status to pipe
>>    [Newcomer] t7004: One command per line
>>    [Newcomer] t7004: Do not prepare things outside test_expect_success
>>    [Newcomer] t7004: Use indented here-doc
>>    [Newcomer] t7004: Description on the same line as test_expect_success
>>    [Newcomer] t7004: Description and test body seperated with backslash
>>    [Newcomer] t7004: Use single quotes instead of double quotes
> 
> As you can see from "git shortlog --no-merges --since=6.months", we
> do not capitalize the first word of the title description of each
> patch.
> 
> Also, I haven't looked at the individual patches, it seems the patch
> is somewhoat whitespace damaged.
> 
>      $ git am -s ./+ag8-v4
>      Applying: t7004: remove space after redirect operators
>      .git/rebase-apply/patch:169: indent with spaces.
>              git checkout stable &&
>      .git/rebase-apply/patch:193: indent with spaces.
>              git tag v4.0
>      warning: 2 lines add whitespace errors.
>      Applying: t7004: do not lose exit status to pipe
>      Applying: t7004: one command per line
>      Applying: t7004: do not prepare things outside test_expect_success
>      .git/rebase-apply/patch:1188: indent with spaces.
>              git tag v4.0
>      warning: 1 line adds whitespace errors.
>      Applying: t7004: use indented here-doc
>      Applying: t7004: description on the same line as test_expect_success
>      Applying: t7004: test description and test body seperated with backslash
>      Applying: t7004: use single quotes instead of double quotes
>      .git/rebase-apply/patch:133: indent with spaces.
>              git tag v4.0
>      warning: 1 line adds whitespace errors.
> 

Thanks! I'll fix that and send a v5.