Re: how to access working tree from .git dir?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 7, 2007, 20:43 UTC
- Message-ID
- <7v642m436q.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1189120800.6203.23.camel@beauty>
"Josh England" <jjengla@sandia.gov> writes:
Show 5 quoted lines
> In messsing around with hooks, I've discovered that not all hooks are > run in the same environment. In particular, the current working > directory in the post-receive hook (maybe others as well) is the GIT_DIR > (.git) directory, instead of the root of the working tree (as in > pre-commit).
It is not even "instead of"; that's the only sane thing to do for post-receive, which is in response to git-push and usually used for a bare repository, i.e. without any work tree.