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

inconsistency of checkout_externals and git submodules #111

Open
mvertens opened this issue Jul 5, 2018 · 3 comments
Open

inconsistency of checkout_externals and git submodules #111

mvertens opened this issue Jul 5, 2018 · 3 comments
Assignees
Labels

Comments

@mvertens
Copy link

mvertens commented Jul 5, 2018

Summary of Issue:

The Externals.cfg entry MUST match a git submodule entry - otherwise you will see a difference when invoking the ./manage_externals/checkout_externals -S and you will not be able to reinvoke the checkout_externals

Expected behavior and actual behavior:

You should not be expected to know the exact entries in the git submodules when you add a new Externals.cfg entry - but this is apparently not the case

Steps to reproduce the problem (should include model description file(s) or link to publi c repository):

Invoked checkout_externals for the mom repository where there are submodules that point to several packages - and if they are not the same sha as in the Externals_MOM6.cfg - you will see that there is a "commit diff" when you invoked checkout_externals -S

What is the changeset ID of the code, and the machine you are using:

NA (not dependent on machine)

have you modified the code?

If so, it must be committed and available for testing: no modifications

Screen output or log file showing the error message and context:

Explained above

@gold2718
Copy link
Collaborator

gold2718 commented Jul 6, 2018

Since git submodule status shows the hash of each submodule along with information on conflicts (see https://git-scm.com/docs/git-submodule/), we could maybe add a flag to the Externals.cfg (e.g., use_submodules = True or externals = use_submodules) to just check out those hashes

Another idea is to use the --ignore-submodules option to git status within checkout_externals. I believe this would allow checkout_externals to work but git status outside of checkout_externals would still show conflicts.

@gold2718 gold2718 added the bug label Aug 24, 2019
@gold2718
Copy link
Collaborator

I am going to add to this bug rather than create a new one (because they might be related).
If your top-level repository has submodules but you are trying to override them with an Externals.cfg file, ME considers the blank directories created during cloning or branch checkout to be in an unknown state (the '?' status). It then refuses to do its checkout.

@gold2718
Copy link
Collaborator

Something is missing in the 'steps to reproduce' section above. How did the submodules get checked out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants