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

Re: [PATCH] config.c: Expand $HOME and tilde character in core.excludesfile

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 28, 2008, 22:28 UTC
Message-ID
<alpine.LSU.1.00.0801282225540.23907@racer.site>
In-Reply-To
<y7a9aaem.fsf@blue.sea.net>
Hi,
On Mon, 28 Jan 2008, Jari Aalto wrote:
> c* str_replace(): New function. Generic replace command.
> * str_replace_home(): New funtion. Substitute $HOME and tilde(~) in string.
> * git_default_config(): Pass core.excludesfile to str_replace_home().

I don't like it. Not only do you fail to provide an example where this could be useful, you also introduce a memory leak for every excludes setting.

Besides, there is a more fundamental reason to reject this patch: it sets a path for an excludes file for everybody, but to a file which usually does not exist.

So either the user creates that file, in which case you can expect her to adjust ~/.gitconfig, too, or it is not created, in which case the setting in /etc/gitconfig is useless.

There is also a third option: there is a file created for every user from /etc/skel, but then there can also be a ~/.gitconfig.

Ciao, Dscho

Previous: Jari AaltoNext: Jakub Narebski
Message 2 of 7 in “config.c: Expand $HOME and tilde character in core.excludesfile”
  1. config.c: Expand $HOME and tilde character in core.excludesfileJari Aalto, Jan 28, 2008
  2. Johannes SchindelinJan 28, 2008
  3. Jakub NarebskiJan 28, 2008
  4. Miles BaderJan 29, 2008
  5. David SymondsJan 29, 2008
  6. Miles BaderJan 29, 2008
  7. Wayne DavisonJan 28, 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.