Re: Need to set GIT_WORK_TREE when setting GIT_DIR !?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 10, 2012, 21:20 UTC
- Message-ID
- <7vsjhg17bh.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CACsJy8AUo3+ECdxfnyfYGA-mAtHB8KBOUrie3_Qo3cyfshZmAA@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> Historical reason: before separate worktree feature was introduced, > git assumed worktree was at $GIT_DIR's parent directory.
Isn't the rule that the current directory becomes the root of the working tree if you did not have GIT_WORK_TREE?
In any case, the way I read Frédéric is that the other repository's files will be accessed only from the root of the working tree, so as long as the GIT_DIR/config says it is not a bare repository, it should be OK.