Repository navigation
feat: branch --from-patches builds the nested branch from the patches - #216
Merged
Merged
Conversation
thorsten-klein
force-pushed
the
feat/211-patches-ignore
branch
from
November 13, 2026 19:27
15f6958 to
e2e88f5
Compare
thorsten-klein
force-pushed
the
feat/208-from-patches
branch
2 times, most recently
from
November 13, 2026 19:37
68b398f to
b28518d
Compare
thorsten-klein
force-pushed
the
feat/211-patches-ignore
branch
from
November 13, 2026 19:37
e2e88f5 to
e0d019e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #216 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 49 49
Lines 2525 2713 +188
==========================================
+ Hits 2525 2713 +188
|
thorsten-klein
force-pushed
the
feat/208-from-patches
branch
from
November 13, 2026 20:02
b28518d to
e1b0b54
Compare
thorsten-klein
force-pushed
the
feat/211-patches-ignore
branch
from
November 13, 2026 20:02
e0d019e to
3d0dff6
Compare
thorsten-klein
added a commit
that referenced
this pull request
Nov 13, 2026
… repo as patch files (#212) Fixes #198 First of five stacked PRs for the patches. Each builds on the one before: #212 → #213 → #214 → #215 → #216. ## What - New field `patches: <path>` in `.gitnested`: the folder with the local changes as patch files, relative to the subdir. Without it, the patches are off. - New command `git nested patches create [<subdir>]`: - applies the patches on the upstream commit with `git am`, - writes what HEAD has on top as one more patch, with a TODO title, - writes all patches again in one form: no commit id, no signature, named after the title. - The folder is never pushed. `diff` and `status` do not count it. - Nested repos inside the subdir are left out. They can have their own folder. - `verify --patches` applies patches with `git am` now, so a plain diff given as a patch is refused. `--diffs` still uses `git apply`. - New module `patchbuild.py`: the temporary worktree, `git am`, and writing the patches. `verify` uses it too. ## Docs New page `doc/cli/patches.md` and guide `doc/guides/patches.md`. Updated the `.gitnested` reference, `config`, `verify`, the man page and the call diagrams. ## Tests New `tests/e2e/test_patches.py`. The full suite passes with 100% coverage.
thorsten-klein
force-pushed
the
feat/211-patches-ignore
branch
2 times, most recently
from
November 13, 2026 20:54
35764e3 to
a40316c
Compare
thorsten-klein
force-pushed
the
feat/208-from-patches
branch
from
November 13, 2026 20:54
e1b0b54 to
02fd01e
Compare
|
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.



Fixes #208
Based on #215. Part 5 of 5.
What
git nested branch --from-patches <subdir>builds the nested branch as the upstream commit plus one commit per patch. Each commit has the author, date and message of its patch. It stops if the result is not what HEAD has: a change not in a patch, or a missing patch. Not with-S.This also covers #207: build the branch, cherry-pick one commit onto upstream, and push it with plain git.
Docs
doc/cli/branch.md, and two "Common tasks" in the patches guide: look at the patches as commits, and offer one patch upstream.Tests
One commit per patch with its author, a change not in a patch, a missing patch, no patches, a refused filter, and
-S.