git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: contrib/workdir/git-new-workdir broken in 1.7.10 after introducing gitfiles

From
AHAntonin Hildebrand <antonin@hildebrand.cz>
Date
Apr 22, 2012, 03:56 UTC
Message-ID
<CAHsq6J6MK4x7WZ=aox3hX11hFAng7Tp-XpR0ADs=UgUMwf20Ow@mail.gmail.com>
In-Reply-To
<xmqq397wzwwd.fsf@junio.mtv.corp.google.com>
Quite frankly, the discussion got pretty technical for me and I don't follow it.

I have just posted my current solution involving hard links instead new-workdir script: http://stackoverflow.com/a/10265084/84283

Also it links this discussion as a warning that new-workdir may not be the right solution.

Anyways, thanks for your great job on git! Much appreciated.
On Sat, Apr 21, 2012 at 12:51 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 37 quoted lines
> 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.
>
>
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 7 in “contrib/workdir/git-new-workdir broken in 1.7.10 after introducing gitfiles”
  1. Antonin HildebrandApr 20, 2012
  2. Jens LehmannApr 21, 2012
  3. Junio C HamanoApr 21, 2012
  4. Antonin HildebrandApr 22, 2012
  5. Junio C HamanoApr 22, 2012
  6. Jens LehmannApr 22, 2012
  7. Mark LevedahlApr 22, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.