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