Re: [PATCH] Expand ~ and ~user in core.excludesfile, commit.template
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Nov 16, 2009, 23:47 UTC
- Message-ID
- <m3k4xqc9qj.fsf@localhost.localdomain>
- In-Reply-To
- <1258366060-27966-1-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 11 quoted lines
> These config variables are parsed to substitute ~ and ~user with getpw > entries. > > user_path() refactored into new function expand_user_path(), to allow > dynamically allocating the return buffer. > > Original patch by Karl Chen, modified by Matthieu Moy. > > Signed-off-by: Karl Chen <quarl@quarl.org> > Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> > ---
Show 14 quoted lines
> diff --git a/Documentation/config.txt b/Documentation/config.txt > index d1e2120..c37b51d 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -380,7 +380,8 @@ Common unit suffixes of 'k', 'm', or 'g' are supported. > core.excludesfile:: > In addition to '.gitignore' (per-directory) and > '.git/info/exclude', git looks into this file for patterns > - of files which are not meant to be tracked. See > + of files which are not meant to be tracked. "~" and "~user" > + are expanded to the user's home directory. See > linkgit:gitignore[5]. > > core.editor::
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
-- Jakub Narebski Poland ShadeHawk on #git