Releases: GEOS-ESM/mepo
Clean up of mepo save
Fix for cloning
This is a bugfix for mepo. Before, mepo did this when cloning a branch/tag called foo
:
git clone repo.git
git checkout foo
This worked just fine until an update to the MOM6 repo in GEOS. The issue is that in MOM6, the fork was updated and in that update, the submodules underneath changed on the default branch and there were less. So, in doing so, you couldn't get the new submodules. The solution is to do:
git clone -b foo repo.git
This exposed some other issues in status
and compare
which seem to be fixed, but time will tell.
Bug fix for mepo status
This release fixes a bug in mepo status
.
The way mepo was figuring out what branch you were on with detached head was:
git show -s --pretty=%D HEAD
and then taking the second field. In most cases, this is fine, but sometimes you have two branches that are identical:
❯ git show -s --pretty=%D HEAD
HEAD, origin/feature/wputman/dyamond_v2, origin/develop, origin/HEAD, develop
So, even though you checked out develop
, mepo status
was returning that after running mepo clone
you were on feature/wputman/dyamond_v2
. While this isn't incorrect, it doesn't match where we started and mepo shows a difference.
After looking at the git source code, I think it uses the internals used for the reflog to get this. If I look at the git-reflog
output:
❯ git reflog
eb7e199 (HEAD, origin/feature/wputman/dyamond_v2, origin/develop, origin/HEAD, develop) HEAD@{0}: checkout: moving from develop to origin/develop
eb7e199 (HEAD, origin/feature/wputman/dyamond_v2, origin/develop, origin/HEAD, develop) HEAD@{1}: clone: from github.com:GEOS-ESM/GEOSgcm_GridComp.git
Now we see internally it knows we checked out develop
and then detached to origin/develop
. We can capture this knowledge with git reflog HEAD -n 1
and then take the last part of the string.
I also clean up an odd save issue.
Add mepo commit -a
This release adds the ability to do mepo commit -a
or mepo commit --all
a la git commit -a/--all
. It essentially runs mepo stage
and then mepo commit
.
Thanks to @WilliamJamieson for this feature.