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