Re: [PATCH] config: fix several access(NULL) calls
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 16, 2012, 16:56 UTC
- Message-ID
- <7vbojf4pbt.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <vpq7gu3wtgo.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 9 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > >> I would think that it is plausible that the user wanted to write >> into XDG one and used "unset HOME" as a way to signal that wish. > > I didn't think of this case, but it makes sense. > > Anyway, I don't really care either way, so I leave it up to you (either > your patch below, or the fixup in pu).
I do not care deeply either, as there always is "config -f $file" if somebody wants to write into a specific location.
But if you do something that is different from a straight-and-dumb conversion from access(A, B) to (A ? access(A, B) : -1), the conversion is bound to be questioned by somebody in 2 years "isn't this a misconversion?". If you did that on purpose, a comment to explain why it is not a misconversion would help them understand the reasoning behind it.