All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH 2/3] home_config_path: allow NULL xdg parameter
Date: Fri, 25 Jul 2014 20:16:20 +0200	[thread overview]
Message-ID: <vpqa97x483v.fsf@anie.imag.fr> (raw)
In-Reply-To: <xmqqa97x71p7.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Fri, 25 Jul 2014 11:06:28 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Matthieu Moy <Matthieu.Moy@imag.fr> writes:
>
>> This allows a caller to requst the global config file without requesting
>> the XDG one.
>>
>> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
>> ---
>> This is actually not needed, but I wrote this for a previous version,
>> and it seems sensible anyway.
>
> I was about to say "Let's not do this until some caller needs it",
> implicitly assuming that we do not let global=NULL to signal that
> the caller is interested only in XDG, but I checked and we do check
> the NULL-ness of global, so it is consistent to do so for xdg.  The
> change makes very good sense.
>
> I wouldn't have had to spend the time to dig, if the log message
> justified it that way, instead of having "actually not needed"
> comment there ;-)
>
> 	home_config_paths(): let the caller ignore xdg path
>
> 	The caller can signal that it is not interested in learning
> 	the location of $HOME/.gitconfig by passing global=NULL, but
> 	there is no way to decline the ptah to the configuration
> 	file based on $XDG_CONFIG_HOME.
>
>         Allow the caller to pass xdg=NULL to signal that it is not
>         interested in the XDG location.

Good point. Applied locally, I'll resend later.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2014-07-25 18:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 13:44 [RFC PATCH 1/3] config --global --edit: create a template file if needed Matthieu Moy
2014-07-25 13:44 ` [RFC PATCH 2/3] home_config_path: allow NULL xdg parameter Matthieu Moy
2014-07-25 13:57   ` Tanay Abhra
2014-07-25 18:06   ` Junio C Hamano
2014-07-25 18:16     ` Matthieu Moy [this message]
2014-07-25 13:44 ` [RFC PATCH 3/3] commit: advertize config --global --edit on guessed identity Matthieu Moy
2014-07-25 15:40   ` Eric Sunshine
2014-07-25 15:37 ` [RFC PATCH 1/3] config --global --edit: create a template file if needed Eric Sunshine
2014-07-25 16:01   ` Matthieu Moy
2014-07-25 17:51     ` Eric Sunshine
2014-07-25 17:59     ` Junio C Hamano
2014-07-25 17:36 ` Junio C Hamano
2014-07-25 17:52   ` Matthieu Moy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqa97x483v.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.