All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Levedahl <mlevedahl@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] git-submodule - Follow top-level remote on init/update/clone
Date: Mon, 11 Feb 2008 20:34:04 -0500	[thread overview]
Message-ID: <47B0F78C.1050605@gmail.com> (raw)
In-Reply-To: <alpine.LSU.1.00.0802120109270.3870@racer.site>

Johannes Schindelin wrote:
> Hi,
>
> On Mon, 11 Feb 2008, Mark Levedahl wrote:
>
>   
>> Johannes Schindelin wrote:
>>
>>     
>>>> @@ -107,7 +112,7 @@ module_clone()
>>>>  	test -e "$path" &&
>>>>  	die "A file already exist at path '$path'"
>>>>  -	git-clone -n "$url" "$path" ||
>>>> +	git-clone -n -o "$remote" "$url" "$path" ||
>>>>  	die "Clone of '$url' into submodule path '$path' failed"
>>>>  }
>>>>      
>>>>         
>>> If you do _that_, you will _force_ the submodule to have no "origin" 
>>> remote.  As discussed _at length_, this is not what you should do.  
>>> The only reason to use "-o <other-nick-name>" is if you plan _not_ to 
>>> use the same URL for the default remote.
>>>       
>> This *must* define the remote using the same name as flowed down from 
>> top-level, whatever that name is.
>>     
>
> At this point, I give up my review in despair,
> Dscho
>
>   
The submodules must use the same remote name to refer to the same 
server/repo-tree as top-level, or the coordinated fetch / update driven 
by top-level's branch.<name>.remote cannot work. It is always origin, or 
always frotz, not mix and match. There are two ways to achieve this:

1) Use the name given by top-level, as I did.
2) Restrict git to only allow one remote name, *origin*, ever (or at 
least if submodules are used). Not just the default remote, *any* 
remote. This removes branch.<name>.remote as that is defined to be origin.

I infer you choose option 2? It is certainly simpler, though 
significantly more restrictive.

Mark

      reply	other threads:[~2008-02-12  1:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-09 16:57 [PATCH 1/3] git-submodule - Follow top-level remote on init/update/clone Mark Levedahl
2008-02-09 16:57 ` [PATCH 2/3] git-submodule - Allow adding a submodule in-place Mark Levedahl
2008-02-09 16:57   ` [PATCH 3/3] Add t/t7401 - test submodule interaction with remotes machinery Mark Levedahl
2008-03-03 13:14   ` [PATCH 2/3] git-submodule - Allow adding a submodule in-place Ping Yin
2008-02-11 22:09 ` [PATCH 1/3] git-submodule - Follow top-level remote on init/update/clone Johannes Schindelin
2008-02-12  1:00   ` Mark Levedahl
2008-02-12  1:10     ` Johannes Schindelin
2008-02-12  1:34       ` Mark Levedahl [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=47B0F78C.1050605@gmail.com \
    --to=mlevedahl@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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.