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

Re: Saving space/network on common repos

From
CSCraig Silverstein <csilvers@khanacademy.org>
Date
Dec 23, 2014, 05:36 UTC
Message-ID
<CAGXKyzFXVODvbqzO3CAQRr2S4dDbe95TGc=8iYgcBkKpAPiXSg@mail.gmail.com>
In-Reply-To
<20141223031233.GX29365@google.com>

} This seems like good motivation to try to get that series in good shape and release it soon.

I was going to spend some time tomorrow (if I can find any :-) ) trying to fix up the contrib script to work with submodules, or at least the kind that we use. Is that something that's worth the time to do, or would we be better off just waiting for the work-tree stuff to get released? If I do end up doing it, would you be interested in a pull request (or however patches are submitted in the git world)?

craig
On Mon, Dec 22, 2014 at 7:12 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 36 quoted lines
> Craig Silverstein wrote:
>
>> btw, just FYI, the scheme you lay out here doesn't actually work
>> as-is.  The problem is the config file, which has an entry like:
>>            worktree = ../../../mysubmodule
>> This depends on the config file living in
>> ./git/modules/mysubmodule/config.  But the proposed scheme moves the
>> config file to mysubmodule/.git/config, and the relative path is
>> broken.
>
> As was pointed out to me privately, the behavior is exactly as you
> described and I had confused myself by looking at directory that
> wasn't even made with git-new-workdir.  Sorry for the nonsense.
>
> Workdirs share a single config file because information associated to
> branches set by "git branch --set-upstream-to", "git branch
> --edit-description", "git remote", and so on are stored in the config
> file.
>
> The 'git checkout --to' series in "pu" avoids this problem by ignoring
> core.bare and core.worktree in worktrees created with 'git checkout --to'.
> To try it:
>
>         git clone https://kernel.googlesource.com/pub/scm/git/git
>         cd git
>         git merge 'origin/pu^{/nd/multiple-work-trees}^2'
>         make
>         PATH=$(pwd)/bin-wrappers:$PATH
>
>         git checkout --to=../experiment next
>
> This seems like good motivation to try to get that series in good
> shape and release it soon.
>
> Thanks again,
> Jonathan
Previous: Jonathan Nieder
Message 9 of 9 in “Saving space/network on common repos”
  1. Craig SilversteinDec 17, 2014
  2. Stefan BellerDec 17, 2014
  3. Jonathan NiederDec 17, 2014
  4. Craig SilversteinDec 17, 2014
  5. Jonathan NiederDec 18, 2014
  6. Craig SilversteinDec 23, 2014
  7. Jonathan NiederDec 23, 2014
  8. Jonathan NiederDec 23, 2014
  9. Craig SilversteinDec 23, 2014

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.