Add ability to ignore submodules in diff and status
TL;DR This release adds a new field to components.yaml
, ignore_submodules
which when true
will ignore submodules in the mepo status
and mepo diff
calls.
A mepo oddity occurs in GEOSgcm because of how CICE and icepack are handled.
Technically, icepack is a submodule of CICE in the repo (see https://github.com/GEOS-ESM/CICE) and git sees it as that. However, currently GEOS handles icepack as a separate repo (most likely for ease of development) but git doesn't really know this. So when you go to CICE in GEOS in a fresh clone you see:
$ git status
HEAD detached at geos/v0.0.2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: icepack (new commits)
Submodules changed but not updated:
* icepack 81a7628...8d80ff5 (1):
> Merge pull request #1 from GEOS-ESM/bugfix/zhaobin74/recompute-enthalpy
no changes added to commit (use "git add" and/or "git commit -a")
and since mepo status
just sort of "echoes" status output with mepo status
we see:
cice6 | (t) geos/v0.0.2 (DH)
| icepack: modified, not staged
So git says "something changed" but we want to ignore that in this case.
Thus, this PR adds a new field to components.yaml
, ignore_submodules
:
cice6:
local: ./src/Components/@GEOSgcm_GridComp/GEOSogcm_GridComp/GEOSseaice_GridComp/CICE_GEOSPlug/@cice6
remote: ../CICE.git
tag: geos/v0.0.2
develop: geos/develop
ignore_submodules: true
If this is true, then we add --ignore-submodules=all
to underlying git calls when we run mepo diff
and mepo status
From CHANGELOG.md
Added
- Added new
ignore_submodules
field incomponents.yaml
to allow ignoring submodules in a repo. Currently used forstatus
and
diff
commands.
What's Changed
- Add ability to ignore submodules by @mathomp4 in #258
- GitFlow: Merge Develop into main by @mathomp4 in #259
Full Changelog: v1.50.0...v1.51.0