Re: [PATCH] config: fix several access(NULL) calls

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

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> Junio C Hamano <gitster@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]