Subject: Re: [PATCH] git-init: set up GIT_DIR/workdir if GIT_WORK_DIR is set

From: Matthias Lederhofer <[email-masked]>
Date: Mon, 12 Mar 2007 19:08:37 +0100

Junio C Hamano <[email-masked]> wrote:
> Matthias Lederhofer <[email-masked]> writes:
> 
> > ... because
> > $GIT_WORK_DIR is normally interpreted as relative path to the current
> > working directory and not relative to $GIT_DIR.
> 
> Well, it could be that _that_ handling of the environment
> variable is what needs to be fixed.

You're right,  this seems to be much better.

I just thought that GIT_WORK_DIR should be relative to the current
working directory because it's more intuitive, e.g.

    $ git --git-dir=/path/to/repo.git --work-dir=../.. add a

where ../.. matches the path to the toplevel working directory from
cwd.  But this definitely is annoying when changing directories.

I'll go and fix this.  Do you prefer an amended patch or just a patch
on top?