Re: log and diff family: honor config even from subdirectories

From: Junio C Hamano <junkio@cox.net>
Date: 2006-07-29 11:54:24
Linus Torvalds <torvalds@osdl.org> writes:

> I'd actually _like_ to do the setup unconditionally inside the git wrapper 
> (early - to make sure that we don't have this bug), but some things (at 
> least "init-db", "clone" and "ls-remote") are obviously not supposed to do 
> it, since they work outside of a git directory. So either we need to do it 
> in each builtin command separately, or we'd need to add a flag in the 
> command descriptor array.
>
> Any clever ideas?
>
> 		Linus

No clever ideas, but I agree it would be _very_ nice if we could
do the setup unconditionally and early.  Some commands that call
setup want to know prefix, so we would need to introduce a
global to hold the prefix for them.

I do not do this myself, but it is conceivable that you might
want to be able to set GIT_DIR to point at somewhere outside
your working tree hierarchy, _and_ still work in a subdirectory.
The current setup does not allow you to do that; we could
introduce GIT_PROJECT_ROOT environment variable, and when
GIT_PROJECT_ROOT exists difference between getcwd() and the
project root could become the value of prefix.

-
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 Sat Jul 29 11:55:08 2006

This archive was generated by hypermail 2.1.8 : 2006-07-29 11:55:37 EST