git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 2/3] home_config_path: allow NULL xdg parameter

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jul 25, 2014, 18:16 UTC
Message-ID
<vpqa97x483v.fsf@anie.imag.fr>
In-Reply-To
<xmqqa97x71p7.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 29 quoted lines
> 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/
Previous: Junio C HamanoNext: Matthieu Moy
Message 5 of 13 in “config --global --edit: create a template file if needed”
  1. 1/3 config --global --edit: create a template file if neededMatthieu Moy, Jul 25, 2014
  2. 2/3 home_config_path: allow NULL xdg parameterMatthieu Moy, Jul 25, 2014
  3. Tanay AbhraJul 25, 2014
  4. Junio C HamanoJul 25, 2014
  5. Matthieu MoyJul 25, 2014
  6. 3/3 commit: advertize config --global --edit on guessed identityMatthieu Moy, Jul 25, 2014
  7. Eric SunshineJul 25, 2014
  8. Eric SunshineJul 25, 2014
  9. Matthieu MoyJul 25, 2014
  10. Eric SunshineJul 25, 2014
  11. Junio C HamanoJul 25, 2014
  12. Junio C HamanoJul 25, 2014
  13. Matthieu MoyJul 25, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.