git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Jeff King <peff@peff.net>
To: Kyle Meyer <kyle@kyleam.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/5] t1400: modernize style
Date: Mon, 20 Mar 2017 22:01:55 -0400
Message-ID: <20170321020155.dx5juulntg5k6fpr@sigill.intra.peff.net> (raw)
In-Reply-To: <20170321005616.31324-1-kyle@kyleam.com>

On Mon, Mar 20, 2017 at 08:56:11PM -0400, Kyle Meyer wrote:

> These patches follow up on Peff's suggestion to modernize the style in
> t1400-update-ref.sh.
> 
>     20170217082253.kxjezkxfqkfxjhzr@sigill.intra.peff.net
> 
> The first two commits aren't concerned with "modernizing" the tests,
> but instead address issues that I noticed while looking more closely
> at t1400.

Looks good overall to me. Thanks for following up.

> I also considered
> 
>   * making the quoting/spacing/breaks around the test descriptions and
>     bodies more consistent, but I think this leads to too much code
>     churn.

I wouldn't mind the churn if you wanted to do it on top, but it's
definitely not necessary. There's nothing in 'pu' right now that touches
the file.

>   * moving the here-documents for log creation into the following
>     tests, but I don't think it's worth it because it makes already
>     long lines even longer.

Yeah, they're quite long. Probably something like:

  # arguments: <from> <to> <time> <msg>
  reflog () {
	printf '%s %s %s <%s> %s +0000\t%s' \
		"$1" "$2" \
		"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL" \
		"$3" "$4"
  }

  test_expect_success 'verify $m log' '
	{
		reflog $Z $A 1117150200 "Initial Creation" &&
		reflog $A $B 1117150260 "Switch" &&
		reflog $B $A 1117150860 &&
	} >expect &&
	test_cmp expect .git/logs/$m
  '

wouldn't be too bad. Or maybe it's worse, because the actual format is
all tangled up in that printf statement. ;)

I'm OK with it either way.

-Peff

  parent reply index

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21  0:56 Kyle Meyer
2017-03-21  0:56 ` [PATCH 1/5] t1400: rename test descriptions to be unique Kyle Meyer
2017-03-21  1:38   ` Jeff King
2017-03-21  0:56 ` [PATCH 2/5] t1400: set core.logAllRefUpdates in "logged by touch" tests Kyle Meyer
2017-03-21  1:49   ` Jeff King
2017-03-22  1:57     ` Kyle Meyer
2017-03-21  0:56 ` [PATCH 3/5] t1400: use test_path_is_* helpers Kyle Meyer
2017-03-21  1:51   ` Jeff King
2017-03-21  0:56 ` [PATCH 4/5] t1400: remove a set of unused output files Kyle Meyer
2017-03-21  1:51   ` Jeff King
2017-03-21  0:56 ` [PATCH 5/5] t1400: use test_when_finished for cleanup Kyle Meyer
2017-03-21  1:53   ` Jeff King
2017-03-21  2:01 ` Jeff King [this message]
2017-03-21 17:51   ` [PATCH 0/5] t1400: modernize style Junio C Hamano
2017-03-22  1:58     ` Kyle Meyer
2017-03-22  1:58   ` Kyle Meyer

Reply instructions:

You may reply publically 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=20170321020155.dx5juulntg5k6fpr@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=kyle@kyleam.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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox