From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>,
Enrico Weigelt <weigelt@metux.de>,
Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, fbriere@fbriere.net, drizzd@aon.at
Subject: Re: [long] worktree setup cases
Date: Sat, 23 Oct 2010 17:12:35 +0700 [thread overview]
Message-ID: <AANLkTin-W_GF97APs8fHJim0pFbNDGKv6KAnWPDVbiKP@mail.gmail.com> (raw)
In-Reply-To: <20101021160134.GA3732@burratino>
On Thu, Oct 21, 2010 at 11:01 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Nguyen Thai Ngoc Duy wrote:
>> On Thu, Oct 21, 2010 at 10:30 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
>
>>> Speaking of which, it is not clear to me that core.worktree should
>>> fall under the forbidden case discussed above. If it does, what is
>>> the point of making it configurable?
>>
>> I was not the one who introduced core.worktree, so I can't really
>> tell. Maybe less keystrokes?
>
> Yeah, it seems you're totally right. :(
Actually I have my part in this mess too: f5e025a (Documentation:
always respect core.worktree if set - 2009-12-29). I probably just
updated the document according to the code. It matches what Enrico
expects (i.e after .git discovery, worktree defaults is "../", if
core.worktree exists, follow it instead). Going back to the first
commit that introduced separate worktree, 892c41b (introduce
GIT_WORK_TREE to specify the work tree - 2007-06-06), core.worktree is
no different than --work-tree.
So what should it behave? Either revert f5e025a and update the code to
disregard/warn core.worktree if GIT_DIR/--work-tree is unset, or keep
the current behavior, i.e. core.worktree is different from
--work-tree/GIT_WORK_TREE.
The cleanup commit, e90fdc3 (Clean up work-tree handling -
2007-08-01), also gives something interesting regarding bare repo:
"--work-tree=bla overrides GIT_WORK_TREE, _which overrides core.bare =
true_, which overrides core.worktree, which overrides GIT_DIR/.. when
GIT_DIR ends in /.git, which overrides the directory in which .git/
was found.". I don't like this overriding chain, which is why I
proposed to die() if core.bare is set and worktree is explicitly
specified.
--
Duy
next prev parent reply other threads:[~2010-10-23 10:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 8:59 [long] worktree setup cases Nguyen Thai Ngoc Duy
2010-10-20 19:07 ` Jonathan Nieder
2010-10-20 19:18 ` Jonathan Nieder
2010-10-21 1:46 ` Nguyen Thai Ngoc Duy
2010-10-21 3:30 ` Jonathan Nieder
2010-10-21 12:50 ` Nguyen Thai Ngoc Duy
2010-10-21 16:01 ` Jonathan Nieder
2010-10-23 10:12 ` Nguyen Thai Ngoc Duy [this message]
2010-10-21 18:51 ` Enrico Weigelt
2010-10-22 0:34 ` Nguyen Thai Ngoc Duy
2010-10-22 5:00 ` Enrico Weigelt
2010-10-22 5:28 ` .git file (Re: [long] worktree setup cases) Jonathan Nieder
2010-10-22 5:36 ` [long] worktree setup cases Nguyen Thai Ngoc Duy
2010-10-20 21:00 ` Junio C Hamano
2010-10-21 2:23 ` Nguyen Thai Ngoc Duy
2010-10-21 19:01 ` Enrico Weigelt
2010-10-21 23:06 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTin-W_GF97APs8fHJim0pFbNDGKv6KAnWPDVbiKP@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=drizzd@aon.at \
--cc=fbriere@fbriere.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=weigelt@metux.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).