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