Re: [PATCH v2] send-email: try to get fqdn by running hostname --fqdn on Linux and macOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 12 May 2025, at 10:12 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> 
> "Julian Swagemakers" <julian@xxxxxxxxxxxxxxx> writes:
> 
>> 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.

What we can do is use `hostname -f` for macOS, after all its the only darwin based
OS used rn, and use hostname --fqdn for Linux.

Although it still leaves out Alpine Linux.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux