Submodule subscription conflicts with "git submodule -b" option?

38 views
Skip to first unread message

Doug Kelly

unread,
Apr 29, 2015, 11:31:23 AM4/29/15
to repo-d...@googlegroups.com
Hey all,

It looks like the submodule subscription feature conflicts with the "git submodule -b" option added to Git 1.8.2.1, for running "git submodule update --remote" (basically, the same idea as the subscription, but as a manual step.  Would it make sense to add an extra option to .gitmodules to inhibit submodule subscription in these cases where a user really wants the submodule updates to be part of the review process (something of a halfway point to issue 1652)?

Thanks!

--Doug

Stefan Beller

unread,
Apr 29, 2015, 1:36:27 PM4/29/15
to Doug Kelly, repo-discuss
On Wed, Apr 29, 2015 at 8:31 AM, Doug Kelly <doug...@gmail.com> wrote:
> Hey all,
>
> It looks like the submodule subscription feature conflicts with the "git
> submodule -b" option added to Git 1.8.2.1, for running "git submodule update
> --remote"

I agree there is a conflict in the .gitmodules file (both require the
branch field set).
Gerrit additionally needs a "url" field to enable the submodule subscription.


> (basically, the same idea as the subscription, but as a manual
> step.

I think it's a different thing, as the "git submodule update --remote" only
updates the working tree, but doesn't add it to index or even commit it.

The Gerrit submodule subscription however directly makes a commit containing
the changes of the submodule.

> Would it make sense to add an extra option to .gitmodules to inhibit
> submodule subscription in these cases where a user really wants the
> submodule updates to be part of the review process (something of a halfway
> point to issue 1652)?

Personally I would not want to clutter the .gitmodules file any more
than it is now,
but rather add the configuration to gerrit to either make the direct
commit or create
a new change containing the submodule update.

Thanks,
Stefan

Jonathan Nieder

unread,
Apr 29, 2015, 1:42:35 PM4/29/15
to Stefan Beller, Doug Kelly, repo-discuss
*nod* Would it make sense to have a per-project setting "enable submodule subscription"?

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stefan Beller

unread,
Apr 29, 2015, 1:48:22 PM4/29/15
to Jonathan Nieder, Doug Kelly, repo-discuss
I'd even go as far and make the submodule subscription a thing
completely unrelated to
repository contents. So you'd have a REST endpoint and a nice web UI
thing where you
can configure it as you want. but having it tied to the content of the
repository is ... not
optimal IMHO.

And if it's not depending on the content of the repository, you can
enable/disable the
subscription as you want.

Doug Kelly

unread,
Apr 29, 2015, 2:20:04 PM4/29/15
to repo-d...@googlegroups.com, j...@google.com, doug...@gmail.com


On Wednesday, April 29, 2015 at 12:48:22 PM UTC-5, Stefan Beller wrote:
I'd even go as far and make the submodule subscription a thing
completely unrelated to
repository contents. So you'd have a REST endpoint and a nice web UI
thing where you
can configure it as you want. but having it tied to the content of the
repository is ... not
optimal IMHO.

And if it's not depending on the content of the repository, you can
enable/disable the
subscription as you want.


Yes, I should say that I didn't intend to store it with the repository contents
exclusively.  That just made sense as one place where it could be done.
It could just as easily be stored in project.config under
refs/meta/config, which would still allow a REST endpoint/web UI checkbox.

Also, the URL is a normal part of the submodule description, and it looks like
subscription happens if the URL matches the canonical URL of the server or
is a relative URL.  See:

--Doug
Reply all
Reply to author
Forward
0 new messages