Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

sabinem
Copy link
Contributor

@sabinem sabinem commented Jun 24, 2024

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

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
@sabinem sabinem requested a review from caviri June 24, 2024 09:42
@caviri
Copy link
Contributor

caviri commented Jun 24, 2024

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

@sabinem
Copy link
Contributor Author

sabinem commented Jun 24, 2024

@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?

@sabinem sabinem changed the base branch from main to develop June 24, 2024 11:09
@caviri
Copy link
Contributor

caviri commented Jun 24, 2024

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

@sabinem sabinem merged commit b089490 into develop Jun 24, 2024
@sabinem sabinem deleted the improve-component-cloning branch July 2, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants