ESMCI / git-fleximod

MIT License
2 stars 2 forks source link

v0.7.7 seems to now require optional submodules be checked out #45

Closed ekluzek closed 3 weeks ago

ekluzek commented 3 weeks ago

In the CTSM updated to v0.7.7 it seems to now require that the optional doc-builder submodule be checked out.

git status shows it needs an update...

./bin/git-fleximod status
                 fates at tag sci.1.73.0_api.35.0.0
                  cism at tag cismwrap_2_2_001
                   rtm at tag rtm1_0_79
                mosart at tag mosart1_0_49
             mizuRoute at tag cesm-coupling.n02_v2.1.2
            ccs_config at tag ccs_config_cesm0.0.106
                  cime at tag cime6.0.246
                 cmeps at tag cmeps0.14.63
                 cdeps at tag cdeps1.0.34
                 share at tag share1.0.19
                   mct at tag MCT_2.11.0
            parallelio at tag pio2_6_2
e          doc-builder not checked out, aligned at tag v1.0.8
    testfails = 0, local mods = 0, needs updates 1

and it fails when I try to commit using "." to commit everything in the top level directory and below...

git commit -m "Tweak the documenation a bit" .
error: 'doc/doc-builder' does not have a commit checked out
fatal: updating files failed

It does let me commit if I explicitly add the files to commit however. And I assume if I check doc-builder out it would've also allowed me to commit the first way.

jedwards4b commented 3 weeks ago

I'm not sure what you would have me do about this. The error is in the git commit not in git-fleximod, I would suggest you consider changing your workflow a bit. For example git commit -a -m"Tweak the documenation a bit" should work just fine.

ekluzek commented 3 weeks ago

Ahhh, yep the "-a" works as well.

I actually thought the behavior had changed as well for optional submodules. But, you are right it did not.

The status just says it's not checked out, and the update marks it as optional and skipping.

So here's one request. How about the status adds a string at the end for optional submodules to say they are optional. So a "(optonal)" string to end it?

e doc-builder not checked out, aligned at tag v1.0.8 (optional)

rather than this

e doc-builder not checked out, aligned at tag v1.0.8

jedwards4b commented 3 weeks ago

Sure - that can be done.