git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH 03/10] t1450: make hash size independent
Date: Tue, 11 Jun 2019 19:20:31 -0400	[thread overview]
Message-ID: <CAPig+cT-N6=-9CJR1ugQnrksy-Zfx7bqnppsEdpiX8qaG-7_Hg@mail.gmail.com> (raw)
In-Reply-To: <20190611230255.146381-1-jonathantanmy@google.com>

On Tue, Jun 11, 2019 at 7:03 PM Jonathan Tan <jonathantanmy@google.com> wrote:
> >  test_expect_success 'alternate objects are correctly blamed' '
> >       test_when_finished "rm -rf alt.git .git/objects/info/alternates" &&
> > +     path=$(test_oid numeric) &&
> > +     path=$(test_oid_to_path "$path") &&
>
> Double assignment to path?

I tripped over this, as well, when reading the patch, but if you look
closely, the second assignment is "refining" a value computed in first
assignment. It would have been clearer if written as:

    name=$(test_oid numeric) &&
    path=$(test_oid_to_path "$name") &&

or:

    path=$(test_oid_to_path $(test_oid numeric))

  reply	other threads:[~2019-06-11 23:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-09 22:43 [PATCH 00/10] Hash-independent tests, part 4 brian m. carlson
2019-06-09 22:43 ` [PATCH 01/10] t: add helper to convert object IDs to paths brian m. carlson
2019-06-09 22:43 ` [PATCH 02/10] t1410: make hash size independent brian m. carlson
2019-06-09 22:43 ` [PATCH 03/10] t1450: " brian m. carlson
2019-06-10  7:57   ` Eric Sunshine
2019-06-10 22:09     ` brian m. carlson
2019-06-11 23:02   ` Jonathan Tan
2019-06-11 23:20     ` Eric Sunshine [this message]
2019-06-11 23:40       ` brian m. carlson
2019-06-11 23:35     ` brian m. carlson
2019-06-09 22:43 ` [PATCH 04/10] t5000: make hash independent brian m. carlson
2019-06-09 22:43 ` [PATCH 05/10] t6030: make test work with SHA-256 brian m. carlson
2019-06-09 22:43 ` [PATCH 06/10] t0027: make hash size independent brian m. carlson
2019-06-09 22:43 ` [PATCH 07/10] t0090: make test pass with SHA-256 brian m. carlson
2019-06-09 22:43 ` [PATCH 08/10] t1007: remove SHA1 prerequisites brian m. carlson
2019-06-09 22:43 ` [PATCH 09/10] t1710: make hash independent brian m. carlson
2019-06-09 22:44 ` [PATCH 10/10] t2203: avoid hard-coded object ID values brian m. carlson

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='CAPig+cT-N6=-9CJR1ugQnrksy-Zfx7bqnppsEdpiX8qaG-7_Hg@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=sandals@crustytoothpaste.net \
    /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).