From: Shourya Shukla Date: Fri, 21 Aug 2020 16:59:47 GMT Subject: [GSoC][PATCH v3 0/5] t7401: modernize, cleanup and more Message-ID: <20200821165952.14376-1-shouryashukla.oo@gmail.com> 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 Mentored-by: Kaartic Sivaraam @@ 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 ## 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 - < Mentored-by: Kaartic Sivaraam @@ 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 <