Re: [PATCH] Teach 'git apply' to look at $GIT_DIR/config

From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Date: 2007-02-18 11:08:03
Hi,

On Sat, 17 Feb 2007, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > On Sat, Feb 17, 2007 at 01:12:52PM -0800, Junio C Hamano wrote:
> >
> >> +	prefix = setup_git_directory_gently(&is_not_gitdir);
> >> +	prefix_length = prefix ? strlen(prefix) : 0;
> >> +	if (!is_not_gitdir) {
> >> +		git_config(git_apply_config);
> >> +		if (apply_default_whitespace)
> >> +			parse_whitespace_option(apply_default_whitespace);
> >> +	}
> >> +
> >
> > If I read this correctly, running 'git apply' inside a git repository
> > will parse $GIT_DIR/config and $HOME/.gitconfig. However, outside of a
> > repository it will parse neither. It would make more sense to me to
> > still parse $HOME/.gitconfig to pick up the user's global options.
> 
> I thought about that, but decided against it.  If you are truly
> operating outside a git managed repository, it does not feel
> right to apply configuration user has for git.

That is a good point. But in the same vein, why not have a flag to 
git-apply, and let it ignore the configuration altogether?

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Feb 18 11:08:19 2007

This archive was generated by hypermail 2.1.8 : 2007-02-18 11:23:16 EST