Subject: Re: [PATCH 3/3] git-submodule: add "sync" command

From: David Aguilar <[email-masked]>
Date: Sun, 24 Aug 2008 12:23:44 -0700

On  0, Junio C Hamano <[email-masked]> wrote:
> David Aguilar <[email-masked]> writes:
> > +		(
> > +			unset GIT_DIR
> > +			cd "$path"
> > +			remote=$(get_remote)
> > +			say "Synchronizing submodule url for '$name'"
> > +			git config remote."$remote".url "$url"
> 
> I am not sure about the way you determine $remote.  When the HEAD in the
> submodule repository is detached by prior "git submodule update", this
> will fall back to the default "origin" --- is it a good behaviour?
> 
> This is not an objection; I am merely wondering if that fallback is
> sensible, or if people who are interested in submodules can suggest better
> alternatives.

This is true.  I recall there was a lengthy thread a while
back about how "origin" might not always be what you'd want
when cloning a repo.  I'll address your comments, use
Mark's get_default_remote, and resend.  I have a feeling that
addressing the use of remote names in submodules is beyond
the scope of this patch for now since it seems like we'd need
that info stored somewhere in a superproject gitfile.

-- 

	David