Subject: Re: Need to set GIT_WORK_TREE when setting GIT_DIR !?

From: Frédéric Heitzmann <[email-masked]>
Date: Sat, 10 Mar 2012 14:23:52 +0100

Le 10/03/2012 00:06, Junio C Hamano a écrit :
> Yes, to the question on the Subject line.  But you can also say
>
>      [core] worktree = /path/to/the/work/tree
>
> in $GIT_DIR/config.  Make sure your $GIT_DIR/config does *NOT* say
> that the repository is a bare repository.

Thanks for clarification.
However man git-config says :

"If --git-dir or GIT_DIR is specified but none of --work-tree, 
GIT_WORK_TREE and core.worktree is specified, the
current working directory is regarded as the top level of your working 
tree."

Some more context on my precise problem :
I have a project, with source files managed with git.
I also use some Makefiles that I would like to manage with git _in a 
separate repository_

$ GIT_DIR=<project_path>/.git git add some_file.c ...
$ GIT_DIR=<project_path>/.git_mk git add Makefile ...

Setting worktree in each GIT_DIR/config will fix that but I can't figure 
out why current git implementation actually needs this.

--
Fred