Re: [PATCH] git-init: set up GIT_DIR/workdir if GIT_WORK_DIR is set
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Mar 12, 2007, 13:36 UTC
- Message-ID
- <fcaeb9bf0703120636r7038a7fat24e571e7c087d13d@mail.gmail.com>
- In-Reply-To
- <20070312131253.GA16452@moooo.ath.cx>
On 3/12/07, Matthias Lederhofer <matled@gmx.net> wrote:
Show 19 quoted lines
> Putting $GIT_WORK_DIR as is into $GIT_DIR/workdir is probably not what > the user expects because the content of $GIT_DIR/workdir is > interpreted relative to $GIT_DIR, not the current working directory. > Example: > > /tmp$ mkdir repository working_directory > /tmp$ git --git-dir=repository --work-dir=working_directory init > > If git init puts 'working_directory' into $GIT_DIR/workdir it would > make the associated working directory $GIT_DIR/working_directory = > /tmp/repository/working_directory and not /tmp/working_directory. > > The alternative to use > > /tmp$ git --git-dir=repository --work-dir=../working_directory init > > seems quite confusing to me. > > If you've any other idea to solve this please tell me.
Let users create $GIT_DIR/workdir themselves. Your way may be less confusing to you but might be more confusing to me because I _might_ expect a relative workdir setting (for example I move the repository and the working directory together to another place).
-- Duy