Re: [PATCH v3 1/2] t: add a test helper for getting hostname
- From
Chris Torek <chris.torek@gmail.com>
- Date
- Mar 21, 2024, 00:11 UTC
- Message-ID
- <CAPx1GvfZJpM6T_sbvFvNhg787o20QxHqVAhTXO0a+UEX7Gu9=Q@mail.gmail.com>
- In-Reply-To
- <xmqq5xxhnbgg.fsf@gitster.g>
On Tue, Mar 19, 2024 at 2:44 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Jeff King <peff@peff.net> writes: > > > But we are not testing "includeIf" in this patch; we are testing git-gc, > > which falls back to the string "unknown". > > Ah, I wasn't aware of such a hardcoded default. Then replacing the > existing "hostname" with "test-tool xgethostname" and doing nothing > else is of course the right thing to do here.
Note that if we choose to use $GIT_HOSTNAME (auto-set-if-unset), we can change the test to simply force $GIT_HOSTNAME to something known to the test script.
(That seems orthogonal to this change, but I thought I would mention it.)
Chris