Skip to content

out-of-date-submodule

submodule

parent pinned to an older submodule SHA while the submodule has moved ahead

A parent repo whose pinned submodule SHA (`vendor/lib`) is one commit
behind the submodule's current HEAD. The parent committed the
submodule when it had 2 commits; a third commit was then added
inside the submodule without updating the parent's pin.
`git submodule status` shows `+` for `vendor/lib`, indicating the
checked-out submodule HEAD differs from the parent's recorded SHA.

Useful for testing:
  - out-of-date submodule detection and `+` status flag display
  - "update submodule pin" workflows (`git add vendor/lib` + commit)
  - diff between the pinned SHA and the current submodule HEAD
  - `git submodule update` to restore the pinned state
  • parent main has 2 commits
  • .gitmodules registers vendor/lib
  • git submodule status shows + for vendor/lib
  • vendor/lib HEAD is 1 commit ahead of the parent pin
submoduleout-of-datein-progress
main
import { spinUpScenario } from '@gfargo/git-scenarios'

const repo = await spinUpScenario('out-of-date-submodule')
* c4d8ca4 (HEAD -> main) chore: add vendor/lib submodule
* c428bd9 chore: initial scaffold

Back to Scenario Browser