All of lore.kernel.org
 help / color / mirror / Atom feed
From: cheska fran <cheskaqiqi@gmail.com>
To: Andrei Rybak <rybak.a.v@gmail.com>, git@vger.kernel.org
Subject: Re: [GSoC][PATCH] t/t4113-apply-ending.sh: Modernize a test script
Date: Thu, 2 Feb 2023 12:20:30 -0500	[thread overview]
Message-ID: <CAMO4yUHJCWGNV7esYqC7T4HB=pv3=Z4vTfaBFzh9hAsftfnN3w@mail.gmail.com> (raw)
In-Reply-To: <b9a38b83-cdfe-0389-3097-c20a699f183c@gmail.com>

Hi Andrei,


Andrei Rybak <rybak.a.v@gmail.com> On 31/01/2023 21:21:
> For patches that change a single test, the subject line can include just
> the "t" and the number.  The part after the colon should start with a
> lowercase letter.  Something like
>
>      t4113: modernize test style
>

Thanks, this tip is really helpful. I will change it.


> Commit message should start with description of the existing problem
> in present tense, something like:
>
>      Test scripts in file t4113-apply-ending.sh are written in old style,
>      where the test_expect_success command and test title are written on
>      separate lines ...
>
> Then changes should be described using imperative mood, as if you are
> giving commands to the codebase.  See section "[[describe-changes]]"
> in "Documentation/SubmittingPatches" for details.

> You can also find examples of existing commit messages for similar
> changes:
>
>      $ git log --no-merges --grep='modernize' -- t
>
Thanks,that is cool! I tried it and I saw a lot of examples and their
descriptions were very clear and I learned a lot


> In case of t4113, files "test-patch" and "file" are created twice.
> The second creation of the files could be either its own step
> 'setup for apply at the beginning', or incorporated into the step
> 'apply at the beginning'.
yeah,once before the first instance of test-patch and then again
before the second instance of test-patch.
I will move the second creation of the files to its own step in setup
for apply at the beginning.'

> Section "Recommended style" in t/README also has some notes about
> how heredocs should be indented.

Sure, I did not realize this.I will use "<<-" instead of "<<".

> While changing the quoting around test tiles and commands, the
> indentation with spaces could also be changed to TABs.
will do.

> If the setup code on top level of the file is moved into test
> steps, this comment and the "# setup" comment at line 11 will
> become unnecessary.
Thanks. It's easy to miss.The purpose of these tags is to distinguish
the setup and test parts of the script,
but if the file creation has been moved to a separate step, then these
tags are no longer needed.



Thanks for the reply and it is really helpful!

--
Thanks,
Shuqi

  reply	other threads:[~2023-02-02 17:20 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 22:49 [GSoC][PATCH] t/t4113-apply-ending.sh: Modernize a test script Shuqi Liang
2023-02-01  2:21 ` Andrei Rybak
2023-02-02 17:20   ` cheska fran [this message]
2023-02-02 17:18 ` [PATCH v2 0/4] t4113: modernize test style Shuqi Liang
2023-02-02 17:18   ` [PATCH v2 1/4]t4113: replace backslash with single quote Shuqi Liang
2023-02-02 21:00     ` Junio C Hamano
2023-02-05 14:28       ` Shuqi Liang
2023-02-02 17:18   ` [PATCH v2 2/4] t4113:put second creation in own step Shuqi Liang
2023-02-02 17:18   ` [PATCH v2 3/4] t4113: use "<<-" instead of "<<" Shuqi Liang
2023-02-02 21:05     ` Junio C Hamano
2023-02-05 14:38       ` Shuqi Liang
2023-02-02 17:18   ` [PATCH v2 4/4] t4113: indent with tabs Shuqi Liang
2023-02-02 21:10     ` Junio C Hamano
2023-02-05 14:51       ` Shuqi Liang
2023-02-05 14:52   ` [PATCH v3 0/3] modernize style Shuqi Liang
2023-02-05 14:52     ` [PATCH v3 1/3]t4113: modernize a test script Shuqi Liang
2023-02-05 14:52     ` [PATCH v3 2/3] t4113: put executable lines to test_expect_success Shuqi Liang
2023-02-05 14:52     ` [PATCH v3 3/3] t4113: indent with space Shuqi Liang
2023-02-05 20:29       ` Eric Sunshine
2023-02-06 21:17         ` Shuqi Liang
2023-02-06 21:18     ` [PATCH v4 0/3] t4113: modernize style Shuqi Liang
2023-02-06 21:18       ` [PATCH v4 1/3] t4113: modernize test script Shuqi Liang
2023-02-06 21:18       ` [PATCH v4 2/3] t4113: indent with tab Shuqi Liang
2023-02-06 21:18       ` [PATCH v4 3/3] t4113: put executable lines to test_expect_success Shuqi Liang
2023-02-06 21:50         ` Ævar Arnfjörð Bjarmason
2023-02-06 22:44         ` Junio C Hamano
2023-02-06 23:42           ` Shuqi Liang
2023-02-07  8:05             ` Ævar Arnfjörð Bjarmason
2023-02-07 19:55               ` Shuqi Liang
2023-02-08  5:44               ` Shuqi Liang
2023-02-08  7:44                 ` Ævar Arnfjörð Bjarmason
2023-02-10 15:29                   ` Shuqi Liang
2023-02-15  0:34                   ` Eric Sunshine
2023-02-15  0:26               ` Eric Sunshine
2023-02-14 22:17           ` Shuqi Liang
2023-02-14 22:29             ` Junio C Hamano
2023-02-09 15:44       ` [PATCH v5 0/3] t4113: modernize style Shuqi Liang
2023-02-09 15:44         ` [PATCH v5 1/3] t4113: modernize test script Shuqi Liang
2023-02-09 15:44         ` [PATCH v5 2/3] t4113: indent with tab Shuqi Liang
2023-02-15  0:10           ` Eric Sunshine
2023-02-15  0:18             ` Shuqi Liang
2023-02-09 15:44         ` [PATCH v5 3/3] t4113: put executable lines to test_expect_success Shuqi Liang
2023-02-15  1:09           ` Eric Sunshine
2023-02-15  2:40             ` Shuqi Liang
2023-02-15  2:38         ` [PATCH v6 0/3] t4113: modernize style Shuqi Liang
2023-02-15  2:39         ` Shuqi Liang
2023-02-15  2:39           ` [PATCH v6 1/3] t4113: modernize test script Shuqi Liang
2023-02-15  2:39           ` [PATCH v6 2/3] t4113: indent with tab Shuqi Liang
2023-02-15  2:39           ` [PATCH v6 3/3] t4113: put executable lines to test_expect_success Shuqi Liang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMO4yUHJCWGNV7esYqC7T4HB=pv3=Z4vTfaBFzh9hAsftfnN3w@mail.gmail.com' \
    --to=cheskaqiqi@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rybak.a.v@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.