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

Re: [PATCH] Expand ~ and ~user in core.excludesfile, commit.template

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 17, 2009, 13:30 UTC
Message-ID
<200911171430.36227.jnareb@gmail.com>
In-Reply-To
<vpqlji5plyn.fsf@bauges.imag.fr>
Dnia wtorek 17. listopada 2009 09:57, Matthieu Moy napisał:
Show 28 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>> Jakub Narebski <jnareb@gmail.com> writes:
>>
>>> It would be nice to have an option to git-config which would do such
>>> expansion, as a separate type similar to --int and --bool, e.g.:
>>>
>>>   git config --path section.key
>>>
>>> so that not only core.excludesfile could use this new feature, but for
>>> example also core.worktree, commit.template, gitcvs.logfile,
>>> mailmap.file, and perhaps also *.receivepack and *.uploadpack
>>
>> What should "git config -l" do for these (and core.excludesfile)?
> 
> I don't know what it "should", but it "does" not do the expansion. I
> had the same questionning when testing the patch, I'd have liked to be
> able to write a simple test-case like
> 
> $ git config core.excludesfile '~/foo'
> $ git config --i-dont-know-what core.excludesfile
> 
> to go through this codepath. Maybe we can just say
> 
> $ git config --default core.excludesfile
> 
> to say "call git_default_config(...) on this before printing it". My
> understanding is that this is what the C code is doing, we should
> allow the shell scripts to do the same.

I think it is a very good idea. Nevertheless it can apply only to config variables git core knows about, and not for example for git-gui, or gitk, or qgit, or tig, or StGIT, etc. configuration. Therefore "git config --path" would be still needed.

-- 
Jakub Narębski
Poland
Previous: Matthieu MoyNext: Jakub Narebski
Message 8 of 24 in “Expand ~ and ~user in core.excludesfile, commit.template”
  1. Expand ~ and ~user in core.excludesfile, commit.templateMatthieu Moy, Nov 16, 2009
  2. Junio C HamanoNov 16, 2009
  3. Junio C HamanoNov 17, 2009
  4. Matthieu MoyNov 17, 2009
  5. Jakub NarebskiNov 16, 2009
  6. Junio C HamanoNov 17, 2009
  7. Matthieu MoyNov 17, 2009
  8. Jakub NarebskiNov 17, 2009
  9. Jakub NarebskiNov 17, 2009
  10. Jeff KingNov 17, 2009
  11. Mike HommeyNov 17, 2009
  12. Andreas SchwabNov 17, 2009
  13. Junio C HamanoNov 17, 2009
  14. Andreas SchwabNov 18, 2009
  15. Matthieu MoyNov 18, 2009
  16. Matthieu MoyNov 17, 2009
  17. Jeff KingNov 17, 2009
  18. Expand ~ and ~user in core.excludesfile, commit.templateMatthieu Moy, Nov 17, 2009
  19. Expand ~ and ~user in core.excludesfile, commit.templateMatthieu Moy, Nov 18, 2009
  20. Expand ~ and ~user in core.excludesfile, commit.templateMatthieu Moy, Nov 18, 2009
  21. expand_user_path: expand ~ to $HOME, not to the actual homedir.Matthieu Moy, Nov 19, 2009
  22. Jeff KingNov 19, 2009
  23. Matthieu MoyNov 19, 2009
  24. Junio C HamanoNov 19, 2009

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.