Re: [PATCH v2] send-email: try to get fqdn by running hostname --fqdn on Linux and macOS
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 12, 2025, 16:42 UTC
- Message-ID
- <xmqqa57hvl0f.fsf@gitster.g>
- In-Reply-To
- <D9U0KAX6KVXK.WCY7YGX2Q0A5@swagemakers.org>
"Julian Swagemakers" <julian@swagemakers.org> writes:
Show 5 quoted lines
> There are multiple implementations of the hostname command, and they > don't all support `--fqdn`. For example this will not work on Alpine > Linux as well as macOS. > ... > All seem to support `-f` though, maybe that would be the better option.
What makes me worried about such a proposed changes is if there are implementations that takes `-f` but uses it to mean something completely different from fqdn, and emits something that looks like a hostname but is not. At least an implementation that takes --fqdn without erroring out would try to give what this code wants to find out (or it is simply crazy), but -f does not feel specific enough.