Re: [PATCH v3 0/2] Add hostname condition to includeIf

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

 



On Tue, Mar 19, 2024 at 8:19 PM Jeff King <peff@xxxxxxxx> wrote:
> On Tue, Mar 19, 2024 at 05:13:47PM -0400, Eric Sunshine wrote:
> > The other possibility which came to mind was adding a GIT_HOSTNAME
> > variable to the output of `git var -l`.
>
> That strikes me as a more appropriate spot than an option to git-config.
> Even if config is the only thing _now_ which cares about the hostname,
> it may be something that other parts of the system care about in the
> future.

Also, taking into consideration Patrick's proposed revamp[1] of
git-config to give it a subcommand API, then git-config becomes an
even less welcome place for a standalone --show-hostname option which,
by itself, doesn't really fit into the subcommand paradigm, and it
probably doesn't make sense to add a new subcommand ("info" or
whatever) just for that.

[1]: https://lore.kernel.org/git/cover.1710198711.git.ps@xxxxxx/T/#u

> Some care may need to be taken for error handling, though. For "git var
> GIT_HOSTNAME" it is OK to exit non-zero, but "git var -l" should not
> bail on a system where gethostname() doesn't work (it is still not clear
> to me if that is a real case to worry about or not).

Ports to oddball platforms should probably be providing a
gethostname() in "compat/" anyhow, just as is done for Windows in
"compat/mingw.c".





[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