Re: [PATCH 03/10] t1450: make hash size independent
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 11, 2019, 23:20 UTC
- Message-ID
- <CAPig+cT-N6=-9CJR1ugQnrksy-Zfx7bqnppsEdpiX8qaG-7_Hg@mail.gmail.com>
- In-Reply-To
- <20190611230255.146381-1-jonathantanmy@google.com>
On Tue, Jun 11, 2019 at 7:03 PM Jonathan Tan <jonathantanmy@google.com> wrote:
Show 6 quoted lines
> > 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))