Re: [PATCH v2] send-email: try to get fqdn by running hostname --fqdn on Linux and macOS
- From
Aditya Garg <gargaditya08@live.com>
- Date
- May 13, 2025, 12:28 UTC
- Message-ID
- <PN3PR01MB9597CC4D8DB6946BEE9B0FB4B896A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
- In-Reply-To
- <xmqq1pstsi02.fsf@gitster.g>
Show 13 quoted lines
> On 13 May 2025, at 1:45 AM, Junio C Hamano <gitster@pobox.com> wrote: > > Eric Sunshine <sunshine@sunshineco.com> writes: > >> The problem is not restricted only to macOS (and Alpine), but more >> generally to all BSD-lineage `hostname` which does not understand >> --fqdn but does understand -f. > > True, but the proposed patch limits itself to > > $^O eq 'linux' || $^O eq 'darwin' > > for unfathomable reason, so BSD's are safe already ;-)
Exactly. I had tested hostname -f on both macOS and Linux, but was lazy enough to not check --fqdn, thus resulting in a wrong patch. v3 and v4 should work properly. I'll also avoid laziness in the future.