+2

Support change detection and background fetch for submodules

Erik Sperling Johansen 7 years ago updated by Marc Strapetz 7 years ago 11

... regardless of whether a toplevel module is updated/fetched.


Optimally on a per-submodule basis, but an all-or-nothing switch is better than no support.


(topic description on 2017-03-10)

Answer

Answer

I don't exactly understand the description -- the Journal for LibraryA will already show new commits for LibraryA. Can you please review your description and/or give more details?

Answer

I don't exactly understand the description -- the Journal for LibraryA will already show new commits for LibraryA. Can you please review your description and/or give more details?

When I commit to the submodule LibraryA, from the SmartGit window for Project1, there is no indication of new commits being available in the journal for submodule LibraryA within SmartGit window for Project2. These two projects are using different toplevel directories, so I have two copies of LibraryA checked out.

Actually, this could be simplified even more. When someone else commits to a submodule, I'd like to see this in the journal. There seems to be no way to configure a submodule to do background fetches.

I understand now. Unfortunately the submodule is a different repository and displaying such commits doesn't fit into the Journal at all. Also, a pull on your main repository won't bring these new submodule commits because the submodule-pointer (GITLINK) in the parent repository hasn't changed (otherwise you would see this commit in the Journal).

But it could be possible to configure a submodule to do background fetches, so that I can select that submodule, see its journal, and see the new commits?

This should already happen, if (1) you have configured background fetching in the Preferences and (2) you have configured Always fetch new commits, tags and branches from submodules in the Repository settings.

Does that mean the repository pull settings apply also to background fetch?


I can't really enable that, as I need to avoid pulling everything from several large and busy open source libs that also are submodules. What I'm looking for is a per-submodule setting for background fetch - similar to how I'm currently using Favorite for top-level projects.



> Does that mean the repository pull settings apply also to background fetch?


These specific settings, yes.

I've now enabled everything you've mentioned for a while, and I still see no new commits in submodules.


Assuming a setup with a "TopLevel" git repo, which in the directory hierarchy contains one "SubModule" repo. The SubModule repo is only known to SmartGit as a submodule in TopLevel.


Edit/Preferences/Background Commands:

- Disabled "Detect local changes in closed favorite repositories"

- Enabled "Detect remote changes"

- Enabled "Fetch Closed favorite repositories"

- Enabled "Fetch Open repositories when idle"


TopLevel Repository Settings, Pull tab:

- Everything enabled


TopLevel Remote Properties:

- Enable Background Poll/Fetch


SubModule Repository Settings, Pull tab:

- Everything enabled


SubModule Remote Properties:

- Enable Background Poll/Fetch. This has the info icon mentioning it needs to be marked as favorite, however there is no way to mark a submodule as favorite.


I never see that there are new commits to SubModule unless I manually fetch it. Realistically, adding our 15 or so submodules, each referenced in 1-4 different toplevel projects, as standalone repos in SmartGit in order to get change detection isn't a viable solution.


Are there other options I may need to change, or is this just not supported? If not supported, can it become supported at some point? :)




Does that mean that I should be getting changes for submodules with this config? None of our team do.

This appears to not be a bug, but rather a missing feature. Can you confirm this?