git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH 0/4] submodule remotes
@ 2015-04-08 10:58 Patrick Steinhardt
  2015-04-08 10:58 ` [RFC/PATCH 1/4] submodules: implement synchronizing of remotes Patrick Steinhardt
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Patrick Steinhardt @ 2015-04-08 10:58 UTC (permalink / raw)
  To: git; +Cc: Patrick Steinhardt, Jens Lehmann, Heiko Voigt

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-09 11:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 10:58 [RFC/PATCH 0/4] submodule remotes Patrick Steinhardt
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

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).