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

Re: Git config not expanding user home directories

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 30, 2008, 11:38 UTC
Message-ID
<m33ajhsw24.fsf@localhost.localdomain>
In-Reply-To
<48E2043A.4000501@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 15 quoted lines
> Tom Lanyon wrote:
> > 
> > Is it normal behavior that git (well at least git-svn) won't expand
> > ~user from .gitconfig?
> >
> 
> Yes. You could add a patch for that though. git-daemon does ~user
> expansion since quite a long time back, so there's a function ready
> for it. I'd do it by doing something like:
> 
>    git config --path section.key
> 
> so that scripts can get the user-expanded version as well. In-core
> applications can call expand_path() or some such on their own, I
> think.

There was a patch send to git mailing list adding basic '~' support (I think via $ENV{HOME}), and IIRC even ~user support. I don't know what happened to those patches (check mailing list archive), but most probably it was not accepted because it didn't provide a way for scripts to use this functionality, for example via --path option.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Andreas EricssonNext: Jeff King
Message 3 of 5 in “Git config not expanding user home directories”
  1. Tom LanyonSep 30, 2008
  2. Andreas EricssonSep 30, 2008
  3. Jakub NarebskiSep 30, 2008
  4. Jeff KingOct 1, 2008
  5. Andreas EricssonOct 1, 2008

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.