From: Shourya Shukla <shouryashukla.oo@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, christian.couder@gmail.com,
Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com,
liu.denton@gmail.com, me@ttaylorr.com,
Shourya Shukla <shouryashukla.oo@gmail.com>
Subject: [GSoC][PATCH v3 0/5] t7401: modernize, cleanup and more
Date: Fri, 21 Aug 2020 22:29:47 +0530 [thread overview]
Message-ID: <20200821165952.14376-1-shouryashukla.oo@gmail.com> (raw)
Greetings,
The is the v3 of the previously posted patch series with the same title:
https://lore.kernel.org/git/20200812192737.13971-1-shouryashukla.oo@gmail.com/
After suggestions from Junio and Kaartic I made some changes:
-> In 0f7f1d3f9a (t7401: modernize style, 2020-07-23)), Kaartic advised
to use a '--short' instead of '--verify', which will remove the call
to 'cut' since '--short' is the name as '--verify' and on top of that
shortens the hash as per our need. Thus, deliver this change as a
separate commit 2c7afd6147 (t7401: use 'short' instead of 'verify'
and cut in rev-parse calls, 2020-08-14).
-> In 948c85f637 (t7401: use 'short' instead of 'verify' and cut in
rev-parse calls, 2020-08-14), transfer the heredoc limiter change to
7c227a2d47 (t7401: change indentation for enhanced readability,
2020-08-11) since it is more apt there. This was suggested by Junio.
-> 7c227a2d47 (t7401: change indentation for enhanced readability,
2020-08-11), improve the commit message and account for the heredoc
change which was transferred to this commit from the previous one.
-> Although not suggested by anyone, but I also improved the NEEDSWORK
in 313c04e197 (t7401: add a NEEDSWORK, 2020-07-23) to make it more
precise.
Feedback and reviews are appreciated. I am tagging along a range-diff
between the v1 and v2 for ease of review.
Regards,
Shourya Shukla
-----
range-diff:
1: 2939804509 ! 1: 0f7f1d3f9a t7401: modernize style
@@ Commit message
The tests in 't7401-submodule-summary.sh' were written a long time ago
and has a violation with respect to our CodingGuidelines which is,
incorrect spacing in usages of the redirection operator.
- Using a Git command in the upstream of a pipe might result in us
- losing its exit code. So, convert such usages so that they write to
- a file and read from them.
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
@@ t/t7401-submodule-summary.sh: add_file () {
git add "$name" &&
test_tick &&
git commit -m "Add $name"
- done >/dev/null
-- git rev-parse --verify HEAD | cut -c1-7
-+ git rev-parse --verify HEAD >out &&
-+ cut -c1-7 out
- cd "$owd"
- }
- commit_file () {
-@@ t/t7401-submodule-summary.sh: commit_file sm1 &&
- head3=$(
- cd sm1 &&
- git reset --hard HEAD~2 >/dev/null &&
-- git rev-parse --verify HEAD | cut -c1-7
-+ git rev-parse --verify HEAD >out &&
-+ cut -c1-7 out
- )
-
- test_expect_success 'modified submodule(backward)' "
-: ---------- > 2: 948c85f637 t7401: use 'short' instead of 'verify' and cut in rev-parse calls
2: 00c6289d5e ! 3: f5548fe7c6 t7401: change test_i18ncmp syntax for clarity
@@ Metadata
Author: Shourya Shukla <shouryashukla.oo@gmail.com>
## Commit message ##
- t7401: change test_i18ncmp syntax for clarity
+ t7401: change syntax of test_i18ncmp calls for clarity
Change the test_i18ncmp syntax from 'test_i18ncmp actual expected' to
'test_i18ncmp expected actual' to align it with the convention followed
@@ t/t7401-submodule-summary.sh: EOF
test_expect_success '--for-status' "
git submodule summary --for-status HEAD^ >actual &&
- test_i18ncmp actual - <<EOF
-+ test_i18ncmp - actual <<-EOF
++ test_i18ncmp - actual <<EOF
* sm1 $head6...0000000:
* sm2 0000000...$head7 (2):
3: f0b87ddaf6 ! 4: 7c227a2d47 t7401: change indentation for enhanced readability
@@ Commit message
t7401: change indentation for enhanced readability
Change the indentation of expected outputs for enhanced readability of
- the tests.
+ the tests. Also modify the heredoc string limiter in a test which lacks
+ it to support the indentation change.
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
@@ t/t7401-submodule-summary.sh: commit_file sm2
test_expect_success '--for-status' "
git submodule summary --for-status HEAD^ >actual &&
- test_i18ncmp - actual <<-EOF
+- test_i18ncmp - actual <<EOF
-* sm1 $head6...0000000:
++ test_i18ncmp - actual <<-EOF
+ * sm1 $head6...0000000:
-* sm2 0000000...$head7 (2):
4: a743c28d71 ! 5: 313c04e197 t7401: add a NEEDSWORK
@@ t/t7401-submodule-summary.sh
-This test tries to verify the sanity of summary subcommand of git submodule.
+This test script tries to verify the sanity of summary subcommand of git submodule.
'
-+# NEEDSWORK: This test script is old fashioned and may need a big cleanup since
-+# there are lots of commands taking place outside of 'test_expect_success'
-+# block, which is no longer in good-style.
++# NEEDSWORK: This test script is old fashioned and may need a big cleanup due to
++# various reasons, one of them being that there are lots of commands taking place
++# outside of 'test_expect_success' block, which is no longer in good-style.
. ./test-lib.sh
-----
Shourya Shukla (5):
t7401: modernize style
t7401: use 'short' instead of 'verify' and cut in rev-parse calls
t7401: change syntax of test_i18ncmp calls for clarity
t7401: change indentation for enhanced readability
t7401: add a NEEDSWORK
t/t7401-submodule-summary.sh | 149 ++++++++++++++++++-----------------
1 file changed, 76 insertions(+), 73 deletions(-)
--
2.28.0
next reply other threads:[~2020-08-21 17:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 16:59 Shourya Shukla [this message]
2020-08-21 16:59 ` [PATCH v3 1/5] t7401: modernize style Shourya Shukla
2020-08-21 16:59 ` [PATCH v3 2/5] t7401: use 'short' instead of 'verify' and cut in rev-parse calls Shourya Shukla
2020-08-21 16:59 ` [PATCH v3 3/5] t7401: change syntax of test_i18ncmp calls for clarity Shourya Shukla
2020-08-21 16:59 ` [PATCH v3 4/5] t7401: change indentation for enhanced readability Shourya Shukla
2020-08-21 16:59 ` [PATCH v3 5/5] t7401: add a NEEDSWORK Shourya Shukla
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200821165952.14376-1-shouryashukla.oo@gmail.com \
--to=shouryashukla.oo@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kaartic.sivaraam@gmail.com \
--cc=liu.denton@gmail.com \
--cc=me@ttaylorr.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).