Matthieu Moy writes:
> Junio C Hamano 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
Junio C Hamano 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
Matthieu Moy writes:
> Junio C Hamano writes:
>
>> if (use_global_config) {
>> if (is $HOME/.gitconfig usable?) {
>> use it;
>
> Yes, but when $HOME is unset, the question doesn't really make sense.
> Maybe the file exists, but we can't know since the us
Junio C Hamano writes:
> if (use_global_config) {
> if (is $HOME/.gitconfig usable?) {
> use it;
Yes, but when $HOME is unset, the question doesn't really make sense.
Maybe the file exists, but we can't know since the user broke his
configuration by un
Matthieu Moy writes:
> The old code was:
>
> if (use_global_config) {
> char *home = getenv("HOME");
> if (home) {
> char *user_config = xstrdup(mkpath("%s/.gitconfig",
> home));
> given_config_file = user_co
Thomas Rast writes:
> Umm, are you sure? I may be somewhat confused about this, but the tests
> I used to trigger the access(NULL) were IIRC
>
> unset HOME
> git config --get foo.bar
> git config --global --get foo.bar
>
> none of which is writing
I was inaccurate, but that doesn't ch
Matthieu Moy writes:
> Jeff King writes:
>
>> On Fri, Jul 13, 2012 at 10:48:18AM +0200, Matthieu Moy wrote:
>>
>>> Junio C Hamano writes:
>>>
>>> > But is it really true that we want to error out on missing HOME if
>>> > we have usable XDG stuff?
>>>
>>> Anyone else have an opinion on this?
>
Jeff King writes:
> On Fri, Jul 13, 2012 at 10:48:18AM +0200, Matthieu Moy wrote:
>
>> Junio C Hamano writes:
>>
>> > But is it really true that we want to error out on missing HOME if
>> > we have usable XDG stuff?
>>
>> Anyone else have an opinion on this?
>>
>> In short, the question is wh
On Fri, Jul 13, 2012 at 10:48:18AM +0200, Matthieu Moy wrote:
> Junio C Hamano writes:
>
> > But is it really true that we want to error out on missing HOME if
> > we have usable XDG stuff?
>
> Anyone else have an opinion on this?
>
> In short, the question is whether
>
> export XDG_CONFIG_
Junio C Hamano writes:
> But is it really true that we want to error out on missing HOME if
> we have usable XDG stuff?
Anyone else have an opinion on this?
In short, the question is whether
export XDG_CONFIG_HOME=some-existing-dir
unset HOME
git config foo.baz boz
should die("$HOME is
Matthieu Moy writes:
>>> + if (user_config && access(user_config, R_OK) &&
>>> + xdg_config && !access(xdg_config, R_OK))
>>> given_config_file = xdg_config;
>>
>> Shouldn't we be using xdg_config, if user_config is NULL and
>> xdg_config is defined and
Junio C Hamano writes:
> Matthieu Moy writes:
>
>> When $HOME is unset, home_config_paths fails and returns NULL pointers
>> for user_config and xdg_config. Valgrind complains with Syscall param
>> access(pathname) points to unaddressable byte(s).
>>
>> Don't call blindly access() on these varia
Matthieu Moy writes:
> When $HOME is unset, home_config_paths fails and returns NULL pointers
> for user_config and xdg_config. Valgrind complains with Syscall param
> access(pathname) points to unaddressable byte(s).
>
> Don't call blindly access() on these variables, but test them for
> NULL-ne
Matthieu Moy writes:
> When $HOME is unset, home_config_paths fails and returns NULL pointers
> for user_config and xdg_config. Valgrind complains with Syscall param
> access(pathname) points to unaddressable byte(s).
>
> Don't call blindly access() on these variables, but test them for
> NULL-ne
When $HOME is unset, home_config_paths fails and returns NULL pointers
for user_config and xdg_config. Valgrind complains with Syscall param
access(pathname) points to unaddressable byte(s).
Don't call blindly access() on these variables, but test them for
NULL-ness before.
Signed-off-by: Matthie
15 matches
Mail list logo