From: Junio C Hamano <gitster@pobox.com>
To: Isabella Caselli <bellacaselli20@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Eric Sunshine <sunshine@sunshineco.com>,
Ignacio Encinas <ignacio@iencinas.com>
Subject: Re: [PATCH 2/3] t6500: get hostname from "git var"
Date: Mon, 12 Oct 2026 18:43:57 -0700 [thread overview]
Message-ID: <xmqqecdu2x42.fsf@gitster.g> (raw)
In-Reply-To: <CAK4AdTQNqp_B3kp_Be=2pLuX0bSfK_v59_AP5kHwh2YmfHYo_w@mail.gmail.com> (Isabella Caselli's message of "Mon, 12 Oct 2026 22:14:57 -0300")
Isabella Caselli <bellacaselli20@gmail.com> writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> "exercise the wrong case", meaning... where hostname(1) output is
>> different from "git var GIT_HOSTNAME" (aka xgethostname()), we would
>> have written bogus name in .git/gc.pid file, simulating the case where
>> gc.pid was written by a process running on a different machine.
>>
>> What is the implications of doing so?
>
> If the hostnames differ, lock_repo_for_gc() assumes the lock belongs
> to a process on another machine. In that case, strcmp(locking_host,
> my_host) is already true, so the remaining conditions are never
> evaluated, such as !kill(pid, 0).
> So the test would still pass, but wouldn't actually check whether Git
> detects that the pid belongs to a running process on the same machine,
> which is the behavior it is meant to verify.
>
> Should I adjust the commit message to clarify this?
Absolutely. The only reason I asked was because I didn't understand
what you wanted to say in the proposed log message, which means it
is very likely other people would have difficulty reading "git log"
if we committed it as-is.
Thanks.
next prev parent reply other threads:[~2026-10-13 1:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 23:43 hostname: includeIf condition — anyone already working on this? Isabella Caselli
2026-09-29 1:44 ` Jeff King
2026-09-29 12:14 ` Ignacio Encinas
2026-09-29 18:28 ` Jeff King
2026-09-29 19:55 ` Junio C Hamano
2026-10-02 1:52 ` Isabella Caselli
2026-10-12 1:58 ` [PATCH 0/3] Add hostname condition to includeIf Isabella Caselli
2026-10-12 1:58 ` [PATCH 1/3] var: add GIT_HOSTNAME Isabella Caselli
2026-10-12 1:58 ` [PATCH 2/3] t6500: get hostname from "git var" Isabella Caselli
2026-10-12 19:20 ` Junio C Hamano
2026-10-13 1:14 ` Isabella Caselli
2026-10-13 1:43 ` Junio C Hamano [this message]
2026-10-12 1:58 ` [PATCH 3/3] config: learn the "hostname:" includeIf condition Isabella Caselli
2026-10-12 19:24 ` Junio C Hamano
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=xmqqecdu2x42.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=bellacaselli20@gmail.com \
--cc=git@vger.kernel.org \
--cc=ignacio@iencinas.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.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
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