From: Isabella Caselli Date: Tue, 13 Oct 2026 01:14:57 GMT Subject: Re: [PATCH 2/3] t6500: get hostname from "git var" Message-ID: In-Reply-To: Junio C Hamano 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?