A submodule update can appear as a tiny parent-repository diff while changing a large dependency. It can also pass on the author's machine and fail for everyone else if the selected dependency commit is unavailable from the configured remote. Review the dependency transition and its availability together.
For a parent repository tracking vendor/parser, the review has two deliverables: an explanation of the dependency change and a clean checkout using the exact recorded commit. Both are necessary before the parent's small gitlink diff can serve as release evidence.
Distinguish the parent reference from dependency files
The Git submodule model describes a gitlink: a tree entry holding the commit the superproject expects the submodule to use. The parent diff therefore records an identity transition rather than embedding all changed dependency files.
In a synthetic project, vendor/parser moves from one reviewed commit to another. The useful review questions are what changed between those dependency commits, why the application needs that transition, and whether the dependency's build or interface assumptions changed. The small size of the parent diff provides no answer to those questions.
Inspect both repositories' state before updating anything. Local uncommitted changes inside the submodule belong to its working tree and index; they are not captured merely by committing the parent's gitlink. Preserve such work through the dependency repository's normal workflow before attempting checkout changes.
Assign an owner to the dependency update. A parent-repository reviewer may understand the integration while a dependency maintainer understands its internal change. Record the evidence each role supplies without implying that a pinned hash alone establishes trust or suitability.
Inspect the proposed dependency transition
At the superproject root, these commands work in Bash and PowerShell with Git installed:
git status --short
git submodule status --recursive
git diff --submodule=log
git diff --cached --submodule=log
The submodule command reference explains status reporting, while the diff reference documents the submodule log presentation. Compare working-tree and staged views so that the reviewed transition matches the parent snapshot intended for commit.
Read the dependency commits themselves, including their changed interfaces, build scripts, generated outputs, and transitive dependency updates. If history was rewritten or the update crosses an unfamiliar lineage, investigate that explicitly. A commit list is a navigation aid, not a replacement for reviewing the changed behavior.
For nested submodules, extend the inventory recursively. Record which additional repositories become part of a fresh checkout and whether their access requirements match the application's supported development and release environments. Do not let an apparently ordinary update introduce an undocumented private dependency.
Verify availability before publishing the parent reference
A dependency commit that exists only in the author's object database is not sufficient for collaborators. Establish a durable approved remote reference that retains the commit before publishing a superproject change that expects it. Verify the remote access from the same kind of restricted account or credential scope used by consumers.
Review changes to .gitmodules separately from changes to the gitlink. The repository location determines where checkout operations obtain code. Treat an unexpected URL or path change as a trust-boundary decision, even if the dependency commit appears unchanged.
Do not place credentials in a submodule URL. Use the approved authentication mechanism and keep error output suitable for sharing. A failed dependency fetch should identify the missing repository or revision through sanitized context rather than expose authentication material.
Consider retention beyond the next successful clone. If a dependency commit is reachable only from a short-lived review branch, deletion of that branch can undermine future reconstruction. Agree which maintained reference or archive policy preserves the dependency needed by released parent commits.
Test a fresh checkout at the recorded commit
Use a disposable clean checkout that has no dependency objects borrowed from the author's existing workspace. Initialize the approved submodules and select the commits recorded by the parent. The submodule manual distinguishes this recorded-commit workflow from update modes that follow a remote branch.
After obtaining that clean parent checkout through the approved remote and reviewing .gitmodules, run:
git submodule update --init --recursive --checkout
git submodule status --recursive
git ls-files --stage -- vendor/parser
git -C vendor/parser rev-parse HEAD
git -C vendor/parser status --short
--checkout makes the recorded-commit intent explicit even if a local update mode differs. It can change dependency working trees, which is why the clean disposable checkout matters. Do not add --remote: that selects a remote-tracking branch as the update source instead of testing the parent's recorded dependency.
For an initialized dependency at the intended commit, submodule status begins with a space. A leading - means uninitialized, + means the checked-out commit differs from the index, and U indicates a conflict. The staged parent entry should have mode 160000; its object ID should equal the dependency's HEAD. The dependency's short status should be empty for this clean-source exercise. Compare full IDs rather than copying abbreviated prefixes into a release record.
These observations catch different mistakes. Matching IDs with dirty dependency files means the test may use source not represented by the gitlink. A clean but mismatched HEAD tests the wrong version. An uninitialized directory can accidentally fall back to an installed package unless the build requires the expected source. None of those cases establishes that the parent commit is reproducible.
Build and test the parent application in that checkout. Include the dependency's required generated files and platform assumptions. Verify that tests exercise the updated integration rather than a globally installed copy or a previously cached dependency artifact.
Run a deliberate failure check with the dependency unavailable. The build should stop with an actionable error and should not quietly select whatever dependency happens to be present locally. A fallback that changes dependency identity weakens the evidence attached to the parent commit.
The integration environment guide helps separate mutable runtime state. For submodules, also record the parent commit and each dependency commit in the test evidence so another developer can reproduce the same source combination.
Recover without confusing two repository histories
If the new dependency breaks the application, choose a previously verified parent-and-dependency combination. Review the parent gitlink correction through the normal change process. Avoid assuming that moving a parent branch automatically preserves uncommitted files inside every dependency working tree.
If the dependency needs a fix, make and publish that fix in the dependency repository first, then review the resulting gitlink update in the parent. The two histories express different changes and should each remain understandable to their own maintainers.
Retain the previous parent commit and its dependency identities with the integration results. During recovery, verify the same identity and clean-worktree checks used for the update. A parent rollback that leaves an unrelated dependency checkout in place has not reproduced the earlier source combination.
Was this guide useful?
Your rating helps us prioritize clearer, more practical technical content.
Review diffs, run checks, and prepare the release in Arezgit.
Keep Git review, security scanning, API checks, database inspection, and release preparation together in one local desktop application.
Explore Arezgit