odtp-org / odtp

ODTP: A tool designed to manage, run, and design digital twins.
https://odtp-org.github.io/odtp-manuals/
GNU Affero General Public License v3.0
10 stars 1 forks source link

fix(cloning of component repo): consider odtp-component-client #154

Closed sabinem closed 3 months ago

sabinem commented 3 months ago

clone the component repo in such a way that the submodule is taken from the component repo commit: this needs to first check out the component commit and the fetch the submodule

caviri commented 3 months ago

Hello @sabinem, no problem on this one. However, what's the difference? I usually do --recurse-submodules, can this lead to an issue?

sabinem commented 3 months ago

@caviri Yes exactly: if you do:

git clone --recurse-submodules git@github.com:odtp-org/odtp-travel-data-dashboard.git

Then you are checkjng out the submodule from the main branch at its current state. Now when you then do then checkout a commit then you might get the code from the checked out commit, but the submodule code is not updated with it. So if the new commit had a different version of the submodule you would not get that version. For that you would need to synchronise the submodule. Not sure which git command exactly that is.

The way I do it her is just the easiest: I first checkout the commit and then get the submodule at the state that this commit uses.

Was my explanation clear enough?

caviri commented 3 months ago

Yes, @sabinem I see the potential issue now. Seems like a nice workaround to me. Thanks for the explanation