From: Jonathan Nieder <jrnieder@gmail.com>
To: Craig Silverstein <csilvers@khanacademy.org>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: Saving space/network on common repos
Date: Mon, 22 Dec 2014 19:12:33 -0800 [thread overview]
Message-ID: <20141223031233.GX29365@google.com> (raw)
In-Reply-To: <CAGXKyzGnnt6bBEPoy4nvNn=zX0hdRHpgvsAe263apaDsVxv0dA@mail.gmail.com>
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
next prev parent reply other threads:[~2014-12-23 3:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 6:58 Saving space/network on common repos Craig Silverstein
2014-12-17 22:01 ` Stefan Beller
2014-12-17 22:32 ` Jonathan Nieder
2014-12-17 23:57 ` Craig Silverstein
2014-12-18 0:07 ` Jonathan Nieder
2014-12-23 1:00 ` Craig Silverstein
2014-12-23 1:33 ` Jonathan Nieder
2014-12-23 3:12 ` Jonathan Nieder [this message]
2014-12-23 5:36 ` Craig Silverstein
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=20141223031233.GX29365@google.com \
--to=jrnieder@gmail.com \
--cc=csilvers@khanacademy.org \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/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).