From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>,
Jens Lehmann <Jens.Lehmann@web.de>,
Heiko Voigt <hvoigt@hvoigt.net>
Subject: [RFC/PATCH 0/4] submodule remotes
Date: Wed, 8 Apr 2015 12:58:21 +0200 [thread overview]
Message-ID: <1428490705-11586-1-git-send-email-ps@pks.im> (raw)
The following patch series implements a new feature on top of the
submodule command that allows for configuring multiple remotes for
a given submodule. Next to new subcommands `git submodule remote
(add|rm|set-url|show)` that allow to show and modify remotes for
a given submodule, `git remote sync` has been extended to apply
settings to the repositories.
The commands are implemented in such a way that they write the
remote configuration into .gitmodules according to the following
example:
[submodule-remote "submodule-name.remote-name"]
url = http://example.com/remote.git
pushurl = git@example.com:remote.git
where "submodule-name" is the submodule's name and "remote-name"
is the name of the remote when it will be synchronized into the
submodule repository. The section-name is definitly up for
discussion and I don't really know if there might be issues with
the format "submodule-name.remote-name", but as far as I know
there is no possibility of having sub-subsections inside config
files.
There are some issues that I am currently aware of:
- If we specify a remote "origin" for a submodule, `git
submodule sync` will happily overwrite
submodule.${submodule-name}.url. We certainly don't want to
drop the old way of specifying a single URL but I am not
sure what to do when a new "origin" has been specified.
Perhaps a warning or user confirmation would suffice?
- If the user specifies his own remotes and afterwards syncs
the submodule's remotes, his settings will be overwritten.
Maybe remotes should only be synced when a switch is
specified (e.g. `git submodule sync --remotes` or `git
submodule remotes sync`)?
This patch series is not intended to be included as-is as there
are no tests yet and the implementation has not been tested that
much. It should only evaluate if there is any interest and
hopefully spark some discussion as to if this feature is
something that is regarded as useful to others.
iveqy in IRC told me that there has been a discussion on
something similar, I wasn't able to find that though.
Regards
Patrick
Patrick Steinhardt (4):
submodules: implement synchronizing of remotes.
submodules: implement remote commands.
submodules: update docs to reflect remotes.
submodules: add bash completion for remotes.
Documentation/git-submodule.txt | 23 +++
contrib/completion/git-completion.bash | 2 +-
git-submodule.sh | 252 ++++++++++++++++++++++++++++++++-
3 files changed, 274 insertions(+), 3 deletions(-)
--
2.3.5
next reply other threads:[~2015-04-08 11:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 10:58 Patrick Steinhardt [this message]
2015-04-08 10:58 ` [RFC/PATCH 1/4] submodules: implement synchronizing of remotes Patrick Steinhardt
2015-04-08 15:46 ` Junio C Hamano
2015-04-09 11:57 ` Patrick Steinhardt
2015-04-08 10:58 ` [RFC/PATCH 2/4] submodules: implement remote commands Patrick Steinhardt
2015-04-08 10:58 ` [RFC/PATCH 3/4] submodules: update docs to reflect remotes Patrick Steinhardt
2015-04-08 10:58 ` [RFC/PATCH 4/4] submodules: add bash completion for remotes Patrick Steinhardt
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=1428490705-11586-1-git-send-email-ps@pks.im \
--to=ps@pks.im \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).