From: Eric Sunshine <sunshine@sunshineco.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: "Git List" <git@vger.kernel.org>, "Jeff King" <peff@peff.net>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Torsten Bögershausen" <tboegi@web.de>
Subject: Re: [PATCH v2 04/11] t0002: abstract away SHA-1 specific constants
Date: Sun, 19 Aug 2018 16:05:25 -0400 [thread overview]
Message-ID: <CAPig+cQz4oM-csmniSe5LPkHixUOh04i+CLWbJB4dn-NeYS3jg@mail.gmail.com> (raw)
In-Reply-To: <20180819175351.449973-5-sandals@crustytoothpaste.net>
On Sun, Aug 19, 2018 at 1:54 PM brian m. carlson
<sandals@crustytoothpaste.net> wrote:
> Adjust the test so that it computes variables for object IDs instead of
> using hard-coded hashes.
Nit: s/hashes/hash values/
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
> diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
> @@ -92,11 +92,12 @@ test_expect_success 'enter_repo non-strict mode' '
> ) &&
> + head=$(git -C enter_repo rev-parse HEAD) &&
> [...]
> + cat >expected <<-EOF &&
> + $head HEAD
> + $head refs/heads/master
> + $head refs/tags/foo
> EOF
> test_cmp expected actual
> '
Okay, but...
> @@ -107,20 +108,20 @@ test_expect_success 'enter_repo linked checkout' '
> - [...]
> + cat >expected <<-EOF &&
> + $head HEAD
> + $head refs/heads/master
> + $head refs/tags/foo
> EOF
> test_cmp expected actual
> '
This is relying upon 'head' set inside an earlier test, which seems
fragile. More robust would be to compute 'head' anew within each test
which needs it (including the other new test added by this patch).
next prev parent reply other threads:[~2018-08-19 20:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-19 17:53 [PATCH v2 00/11] Hash-independent tests (part 3) brian m. carlson
2018-08-19 17:53 ` [PATCH v2 01/11] t: add tool to translate hash-related values brian m. carlson
2018-08-19 19:40 ` Eric Sunshine
2018-08-19 21:50 ` brian m. carlson
2018-08-19 23:06 ` Eric Sunshine
2018-08-19 23:56 ` brian m. carlson
2018-08-19 17:53 ` [PATCH v2 02/11] t0000: use hash translation table brian m. carlson
2018-08-19 19:54 ` Eric Sunshine
2018-08-19 17:53 ` [PATCH v2 03/11] t0000: update tests for SHA-256 brian m. carlson
2018-08-19 20:01 ` Eric Sunshine
2018-08-19 21:53 ` brian m. carlson
2018-08-19 17:53 ` [PATCH v2 04/11] t0002: abstract away SHA-1 specific constants brian m. carlson
2018-08-19 20:05 ` Eric Sunshine [this message]
2018-08-19 17:53 ` [PATCH v2 05/11] t0027: make hash size independent brian m. carlson
2018-08-19 20:10 ` Eric Sunshine
2018-08-19 21:57 ` [PATCH v2 05/11] t0027: make hash size independent' brian m. carlson
2018-08-19 22:10 ` Eric Sunshine
2018-08-20 14:29 ` Torsten Bögershausen
2018-08-19 17:53 ` [PATCH v2 06/11] t0064: make hash size independent brian m. carlson
2018-08-19 17:53 ` [PATCH v2 07/11] t1006: " brian m. carlson
2018-08-19 17:53 ` [PATCH v2 08/11] t1400: switch hard-coded object ID to variable brian m. carlson
2018-08-19 17:53 ` [PATCH v2 09/11] t1405: make hash size independent brian m. carlson
2018-08-19 17:53 ` [PATCH v2 10/11] t1406: make hash-size independent brian m. carlson
2018-08-19 17:53 ` [PATCH v2 11/11] t1407: make hash size independent 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPig+cQz4oM-csmniSe5LPkHixUOh04i+CLWbJB4dn-NeYS3jg@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=sandals@crustytoothpaste.net \
--cc=tboegi@web.de \
/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).