All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Christopher Wilson <cwilson@cdwilson.us>
Cc: Mark Levedahl <mlevedahl@gmail.com>, git@vger.kernel.org
Subject: Re: Why does adding an existing repo as a submodule modify .git/config?
Date: Thu, 26 May 2011 23:35:17 +0200	[thread overview]
Message-ID: <4DDEC795.3030304@web.de> (raw)
In-Reply-To: <BANLkTingA2oRY4i6OnYSz8PGdTRDqXVdFw@mail.gmail.com>

Am 25.05.2011 05:11, schrieb Christopher Wilson:
> On Tue, May 24, 2011 at 6:06 PM, Mark Levedahl <mlevedahl@gmail.com> wrote:
> 
>> However, while you could then change submodule-add to not register the
>> submodule, you would now have the condition of having a submodule that is
>> checked out in the current tree but *not* registered in .git/config.
> 
> Isn't this exactly what "git submodule add" currently does for
> submodules that are NOT added in place?

That is the inconsistency this thread is about. Thanks Christopher for
bringing that up and to Mark for explaining the rationale for updating
the url in .git/config. I really agree with what Mark said there and also
concur with Christopher that a "git submodule add" should always update
the url in .git/config, no matter if it is an already existing repo being
added or a freshly cloned one.

But unfortunately there is more to it than just adding a
	git config submodule."$path".url "$realrepo"
to the module_clone branch in cmd_add() because that makes tests break
where "git submodule init" doesn't copy the "update" settings into
.git/config anymore as it already finds an url configured there and
thinks there is nothing to do. I'm looking into fixing that right now,
so stay tuned ...

      reply	other threads:[~2011-05-26 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-22 20:02 Why does adding an existing repo as a submodule modify .git/config? Christopher Wilson
2011-05-23 18:43 ` Jens Lehmann
2011-05-24  1:19   ` Mark Levedahl
2011-05-24  7:06     ` Christopher Wilson
2011-05-25  1:06       ` Mark Levedahl
2011-05-25  3:11         ` Christopher Wilson
2011-05-26 21:35           ` Jens Lehmann [this message]

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=4DDEC795.3030304@web.de \
    --to=jens.lehmann@web.de \
    --cc=cwilson@cdwilson.us \
    --cc=git@vger.kernel.org \
    --cc=mlevedahl@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.