git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Chang <ttjtftx@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Jonathan Chang <ttjtftx@gmail.com>,
	Christian Couder <christian.couder@gmail.com>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Thomas Gummerer <t.gummerer@gmail.com>
Subject: [GSoC][PATCH v3 0/3] Avoid using pipes
Date: Sun, 17 Mar 2019 23:23:35 +0800	[thread overview]
Message-ID: <cover.1552835153.git.ttjtftx@gmail.com> (raw)

Hi,

This is my SoC 2019 Microproject: "Avoid pipes in git related commands
in test scripts".

Changes since v2:
	- drop changes to other 2 files as suggested by Christian Couder[1]
	- rename commit message from "t0000-basic:" to "t0000:"[1]
	- use better commit message suggested by Thomas Gummerer[2]
		and Christian Couder[3]
	- fix the incorrect transformation pointed out by Eric Sunshine[4]
	- rename commit message to "fix indentation" as seen in:
		25e3d28efd ("submodule.c: fix indentation", 2018-11-28)
		d4cddd66d7 ("worktree.c: fix indentation", 2016-01-18)

[v1]: https://public-inbox.org/git/20190309154555.33407-1-ttjtftx@gmail.com/
[v2]: https://public-inbox.org/git/20190310080739.63984-1-ttjtftx@gmail.com/

[1]: https://public-inbox.org/git/CAP8UFD274-iDkqPm8-WGXbUmcVqjDE7bSg2bwA-17TWJivn0jA@mail.gmail.com/
[2]: https://public-inbox.org/git/20190310175924.GF31533@hank.intra.tgummerer.com/
[3]: https://public-inbox.org/git/CAP8UFD09QZd=6HyB5Om1PfV=67+CvfyQkcpLU0tukT48QccD0Q@mail.gmail.com/
[4]: https://public-inbox.org/git/CAPig+cSMZrQFrLXoO5KE1uonUxmnYHikr-e6GAq_n6vx3+sPJA@mail.gmail.com/

Jonathan Chang (3):
  t0000: fix indentation
  t0000: avoid using pipes
  t0000: use test_line_count instead of wc -l

 t/t0000-basic.sh | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

Range-diff against v2:
1:  dd3e868436 ! 1:  c3c231d117 t0000-basic: fix an indentation error
    @@ -1,9 +1,11 @@
     Author: Jonathan Chang <ttjtftx@gmail.com>
     
    -    t0000-basic: fix an indentation error
    +    t0000: fix indentation
     
    -    This is a preparatory step prior to removing the pipes after git
    -    commands, which discards git's exit code and may mask a crash.
    +    Fix indentation of a line containing a pipeline to reduce the
    +    noise when refactoring the pipeline in a subsequent commit.
    +    This has been wrong since the refactoring done in 1b5b2b641a
    +    ("t0000: modernise style", 2012-03-02), but carries no meaning.
     
         Signed-off-by: Jonathan Chang <ttjtftx@gmail.com>
     
2:  5bc591e557 ! 2:  5a3c6e24eb t0000-basic: avoid using pipes
    @@ -1,6 +1,6 @@
     Author: Jonathan Chang <ttjtftx@gmail.com>
     
    -    t0000-basic: avoid using pipes
    +    t0000: avoid using pipes
     
         The exit code of the upstream in a pipe is ignored thus we should avoid
         using it. By writing out the output of the git command to a file, we can
3:  be6a218d83 < -:  ---------- t0003-attributes: avoid using pipes
4:  35564c86a1 < -:  ---------- t0022-crlf-rename: avoid using pipes
5:  17acadea53 ! 3:  bc3dee82a9 t0000-basic: use test_line_count instead of wc -l
    @@ -1,6 +1,6 @@
     Author: Jonathan Chang <ttjtftx@gmail.com>
     
    -    t0000-basic: use test_line_count instead of wc -l
    +    t0000: use test_line_count instead of wc -l
     
         Signed-off-by: Jonathan Chang <ttjtftx@gmail.com>
     
    @@ -13,8 +13,8 @@
      	git show --pretty=raw $commit2 >actual &&
     -	numparent=$(sed -n -e "s/^parent //p" -e "/^author /q" actual | wc -l) &&
     -	test $numparent = 1
    -+	sed -n -e "s/^parent //p" -e "/^author /q" actual | wc -l >numparent &&
    -+	test_line_count = 1 numparent
    ++	sed -n -e "s/^parent //p" -e "/^author /q" actual >parents &&
    ++	test_line_count = 1 parents
      '
      
      test_expect_success 'update-index D/F conflict' '
    @@ -24,8 +24,7 @@
      	git ls-files path0 >actual &&
     -	numpath0=$(wc -l <actual) &&
     -	test $numpath0 = 1
    -+	wc -l <actual >numpath0 &&
    -+	test_line_count = 1 numpath0
    ++	test_line_count = 1 actual
      '
      
      test_expect_success 'very long name in the index handled sanely' '
-- 
2.21.0


             reply	other threads:[~2019-03-17 15:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-17 15:23 Jonathan Chang [this message]
2019-03-17 15:23 ` [GSoC][PATCH v3 1/3] t0000: fix indentation Jonathan Chang
2019-03-17 15:23 ` [GSoC][PATCH v3 2/3] t0000: avoid using pipes Jonathan Chang
2019-03-17 16:47   ` Ævar Arnfjörð Bjarmason
2019-03-24 11:26     ` jonathan chang
2019-03-24 19:04       ` Ævar Arnfjörð Bjarmason
2019-03-17 15:23 ` [GSoC][PATCH v3 3/3] t0000: use test_line_count instead of wc -l Jonathan Chang
2019-03-17 16:48   ` Ævar Arnfjörð Bjarmason
2019-03-17 20:06     ` Thomas Gummerer
2019-03-18  7:36       ` Ævar Arnfjörð Bjarmason
2019-03-18  8:15         ` Junio C Hamano

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=cover.1552835153.git.ttjtftx@gmail.com \
    --to=ttjtftx@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    --cc=t.gummerer@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 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 NNTP newsgroup(s).