All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Antonin Hildebrand <antonin@hildebrand.cz>, git@vger.kernel.org
Subject: Re: contrib/workdir/git-new-workdir broken in 1.7.10 after introducing gitfiles
Date: Sat, 21 Apr 2012 12:51:14 -0700	[thread overview]
Message-ID: <xmqq397wzwwd.fsf@junio.mtv.corp.google.com> (raw)
In-Reply-To: <4F930043.1080506@web.de> (Jens Lehmann's message of "Sat, 21 Apr 2012 20:45:23 +0200")

Jens Lehmann <Jens.Lehmann@web.de> writes:

> Opinions?
>
> ----8<-----
> Subject: [PATCH] git-new-workdir: Suggest unsetting the core.worktree setting
>
> Linking to a repository that has the core.worktree option set can only
> work when that core.worktree setting already points to the new-workdir.
> In all other cases strange things will happen, as new-workdir will be
> overridden by that setting.

As you analyzed correctly, core.worktree lets a GIT_DIR to declare that
there is a single working tree associated with it. It fundamentally is
incompatible with new-workdir, which is a hack to let more than one
working tree associated with a single GIT_DIR.

I however do not think a simplistic "unset core.worktree" is a good
suggestion, though, as we do not know why the original repository has
that variable set pointing at somewhere.  Blindly removing it will break
the use of the original repository.  If somebody _really_ wants to use
new-workdir for whatever reason in such a setting, I would imagine that
doing something like this:

 - Create a new repository somewhere that is an identical copy of the
   original repository's GIT_DIR, except for core.worktree dropped;

 - Turn the working tree original repository pointed with core.worktree
   into a "new-workdir" off of that new repository; and

 - When you want more "new-workdir"s, create them off of that new copy.

may work.  But honestly speaking, "Do not use this hack---having more
than one working tree is fundamentally incompatible with it", may be a
more sensible message.

  reply	other threads:[~2012-04-21 19:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 20:16 contrib/workdir/git-new-workdir broken in 1.7.10 after introducing gitfiles Antonin Hildebrand
2012-04-21 18:45 ` Jens Lehmann
2012-04-21 19:51   ` Junio C Hamano [this message]
2012-04-22  3:56     ` Antonin Hildebrand
2012-04-22  4:41     ` Junio C Hamano
2012-04-22 18:32       ` Jens Lehmann
2012-04-22 18:58       ` Mark Levedahl

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=xmqq397wzwwd.fsf@junio.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=antonin@hildebrand.cz \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.