Re: [PATCH v3 0/2] Add hostname condition to includeIf
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 20, 2024, 03:07 UTC
- Message-ID
- <CAPig+cS_hCOnAuwRd_dY5h37-wgHCk2tjS7asm2Dm_p=s41X3Q@mail.gmail.com>
- In-Reply-To
- <CAPig+cT9QxRZhZyZV=Txt1VfqzDZX=gDbXvFg1nO=rjeMFaBeQ@mail.gmail.com>
On Tue, Mar 19, 2024 at 10:49 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 9 quoted lines
> On Tue, Mar 19, 2024 at 8:19 PM Jeff King <peff@peff.net> wrote: > > 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".
Ignore my mumbo jumbo response. You are, of course, correct that the implementation of `git var -l` needs to be done with care so that it doesn't bail if gethostname() fails; that's true regardless of whether or not a platform-specific "compat/" implementation is part of the mix.