Repository navigation
feat: add verify to check a nested repo against patches or diffs - #188
Merged
Merged
Conversation
`git nested verify <subdir> patches|diff [--] <file>...` applies the files with `git apply` to the upstream commit in a temporary worktree and compares the result with <subdir> in HEAD. It fails if they differ. `patches` then writes the missing numbered patch; `diff` writes the whole diff to --output. Fixes #187 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 45 46 +1
Lines 2122 2241 +119
==========================================
+ Hits 2122 2241 +119
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What this changes
New command
git nested verify. It checks that a nested repository is itsupstream commit from
.gitnestedplus a set of patch or diff files.git nested verify ext/lib patches -- patches/lib/*.patch git nested verify -o patches/lib ext/lib patches git nested verify ext/lib diff lib.diff git nested verify -o lib.diff ext/lib diff lib.diffgit applyin a temporary worktree(
.git/tmp/verify/<subdir>).git apply, notgit am, so plain diffswork too.
path,filterandexclude.<subdir>inHEAD, without.gitnestedfiles.patches: writes the missing patch, numbered after the others, next tothe last patch or into
-o/--output, with a TODO title and description.diff: with-o/--output, writes the whole diff to that file.-k/--keepkeeps the temporary worktree.nested/<subdir>branch.Why
Fixes #187
Checklist
uv run poe allpasses (ruff, mypy, pyright, bandit, complexipy, and thetests at 100% coverage)
--help/ the man page updated, if the change is visible to users🤖 Generated with Claude Code