Re: [PATCH 3/3] git-submodule: add "sync" command
- From
David Aguilar <davvid@gmail.com>
- Date
- Aug 24, 2008, 19:23 UTC
- Message-ID
- <20080824192343.GA22134@gmail.com>
- In-Reply-To
- <7vwsi6meas.fsf@gitster.siamese.dyndns.org>
On 0, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> David Aguilar <davvid@gmail.com> 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