All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Craig Silverstein <csilvers@khanacademy.org>
Cc: git@vger.kernel.org, "Jonathan Nieder" <jrnieder@gmail.com>,
	"Nguyễn Thái Ngọc" <pclouds@gmail.com>
Subject: Re: [PATCH] git-new-workdir: support submodules
Date: Fri, 23 Jan 2015 17:37:17 -0800	[thread overview]
Message-ID: <xmqqegqlnelu.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAGXKyzEwAjCNTxRtjSuFh9b6BzzOYKOQryKtXBGY3_hkkFvyVw@mail.gmail.com> (Craig Silverstein's message of "Fri, 23 Jan 2015 16:48:40 -0800")

Craig Silverstein <csilvers@khanacademy.org> writes:

>>> Doesn't a submodule checkout keep some state tied to the working
>>> tree in its repository configuration file?
>>
>> Do you mean, in 'config' itself?  If so, I don't see it.  (Though it's
>> possible there are ways to use submodules that do keep working-tree
>> state in the config file, and we just happen not to use those ways.)
>> Here's what my webapp/.git/modules/khan-exercises/config looks like:
>> ---
>> [core]
>>         repositoryformatversion = 0
>>         filemode = true
>>         bare = false
>>         logallrefupdates = true
>>         worktree = ../../../khan-exercises
>> [remote "origin"]
>>         url = http://github.com/Khan/khan-exercises.git
>>         fetch = +refs/heads/*:refs/remotes/origin/*
>> [branch "master"]
>>         remote = origin
>>         merge = refs/heads/master
>>         rebase = true
>> [submodule "test/qunit"]
>>         url = https://github.com/jquery/qunit.git
>> --
>>
>> The only thing that seems vaguely working-tree related is the
>> 'worktree' field, which is the field that motivated me to set up my
>> patch the way it is.

That is the location of the working tree of the top-level
superproject.  Tied to the state of the submodule working tree
appear in [submodule "test/qunit"] part.

In one new-workdir checkout, that submodule may be "submodule
init"ed, while another one, it may not be.

Or one new-workdir checkout's branch may check out a top-level
project from today while the other one may have a top-level project
from two years ago, and between these two checkouts of the top-level
project, the settings of submodule."test/qunit".* variables may have
to be different (perhaps even URL may have to point at two different
repositories, one historical one to grab the state two years ago,
the other current one).

So sharing config between top-level checkouts may not be enough to
"support submodules" (the patch title).

  reply	other threads:[~2015-01-24  1:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 21:51 [PATCH] git-new-workdir: support submodules Craig Silverstein
2015-01-24  0:48 ` Craig Silverstein
2015-01-24  1:37   ` Junio C Hamano [this message]
2015-01-25  1:47     ` Craig Silverstein
2015-01-26  4:05       ` Junio C Hamano
2015-01-26  4:57         ` Craig Silverstein
2015-01-26  5:39           ` Junio C Hamano
2015-01-27 17:35             ` Jens Lehmann
2015-01-28 10:50               ` Duy Nguyen
2015-01-28 10:53                 ` Duy Nguyen
2015-01-28 20:18                   ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2014-12-23  2:10 Craig Silverstein
2014-12-23 19:08 ` 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=xmqqegqlnelu.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=csilvers@khanacademy.org \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --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 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.