Re: GIT_DIR=. for hooks?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 6, 2010, 17:13 UTC
- Message-ID
- <7v7hrvyx4s.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4B44965F.8040803@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> I can unset GIT_DIR or set WORK_TREE, of course,
That is not just an acceptable but _the_ right way to write hooks that touch the files in the work tree. In earlier versions of git, a git-dir in $PWD was not found without GIT_DIR=. and hooks are supposed to work across versions of git, so this behaviour got stuck.