Compare commits
3 Commits
b9d956b4d3
...
b6613b3a04
| Author | SHA1 | Date | |
|---|---|---|---|
| b6613b3a04 | |||
| 9e7759c9f5 | |||
| 4def357d09 |
@@ -110,6 +110,7 @@
|
|||||||
absent from the pinned revision or from a different branch such as `nixpkgs-unstable`.
|
absent from the pinned revision or from a different branch such as `nixpkgs-unstable`.
|
||||||
- OMP does not discover project skills from `.pi/skills`.
|
- OMP does not discover project skills from `.pi/skills`.
|
||||||
Put skills shared by Pi and OMP under `.agents/skills`, or configure OMP's `skills.customDirectories`.
|
Put skills shared by Pi and OMP under `.agents/skills`, or configure OMP's `skills.customDirectories`.
|
||||||
- Pi is vendored under `third_party/pi` with `git subtree --squash`.
|
- Pi is vendored under `third_party/pi` as a linear vendor import.
|
||||||
Keep subtree import and update commits separate from local edits.
|
Do not use `git subtree add` or `git subtree pull` for Pi PR branches.
|
||||||
Do not remove `git-subtree-dir` or `git-subtree-split` trailers when rewriting Pi history.
|
Gitea rebases the synthetic upstream root commit without the `third_party/pi` prefix.
|
||||||
|
Preserve `git-subtree-dir` and `git-subtree-split` trailers on Pi vendor commits.
|
||||||
|
|||||||
38
README.md
38
README.md
@@ -13,7 +13,8 @@ dev/ Monorepo root
|
|||||||
├── src/ Projects
|
├── src/ Projects
|
||||||
│ └── dotfiles/ Home and system configuration
|
│ └── dotfiles/ Home and system configuration
|
||||||
└── third_party/ External source and vendoring support
|
└── third_party/ External source and vendoring support
|
||||||
└── crates/ Generated Rust crate sources and Bazel targets
|
├── crates/ Generated Rust crate sources and Bazel targets
|
||||||
|
└── pi/ Vendored Pi source
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rust dependencies
|
## Rust dependencies
|
||||||
@@ -47,23 +48,36 @@ Do not edit generated files manually.
|
|||||||
## Vendored Pi
|
## Vendored Pi
|
||||||
|
|
||||||
Pi source lives in `third_party/pi/`.
|
Pi source lives in `third_party/pi/`.
|
||||||
This directory is a squashed `git subtree` import from upstream Pi.
|
The directory is a linear vendor import from upstream Pi.
|
||||||
Local fork changes are carried directly in that vendored tree.
|
Local fork changes are carried directly in that vendored tree.
|
||||||
|
|
||||||
Update Pi with `git subtree pull`.
|
Use the upstream tag that matches the target CLI release.
|
||||||
Use the upstream tag that matches the target CLI release:
|
The CLI version lives in `packages/coding-agent/package.json`.
|
||||||
|
|
||||||
|
Do not use `git subtree add` or `git subtree pull` for Pi PR branches.
|
||||||
|
Those commands create a synthetic upstream root commit.
|
||||||
|
Gitea rebase applies that root commit without the `third_party/pi` prefix.
|
||||||
|
That causes add/add conflicts on repository root files.
|
||||||
|
|
||||||
|
Update the vendor tree with a linear commit:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git subtree pull \
|
git fetch https://github.com/earendil-works/pi.git refs/tags/v<version>
|
||||||
--prefix=third_party/pi \
|
split="$(git rev-parse FETCH_HEAD)"
|
||||||
https://github.com/earendil-works/pi.git \
|
rm -rf third_party/pi
|
||||||
v<version> \
|
mkdir -p third_party/pi
|
||||||
--squash
|
git archive --format=tar "$split" | tar -C third_party/pi -xf -
|
||||||
|
git add third_party/pi
|
||||||
|
git commit \
|
||||||
|
-m "chore(vendor): import pi <version>" \
|
||||||
|
-m "Imported as a linear vendor commit so forge rebases do not replay the upstream root tree." \
|
||||||
|
-m "git-subtree-dir: third_party/pi" \
|
||||||
|
-m "git-subtree-split: $split"
|
||||||
```
|
```
|
||||||
|
|
||||||
Keep the subtree import or update commit separate from local edits.
|
Keep the vendor import or update commit separate from local edits.
|
||||||
Do not squash away the `git-subtree-dir` and `git-subtree-split` trailers.
|
Do not remove the `git-subtree-dir` and `git-subtree-split` trailers.
|
||||||
Future subtree updates use those trailers to find prior imports.
|
They record the upstream source commit for future updates.
|
||||||
|
|
||||||
After the upstream update, resolve conflicts in `third_party/pi/`.
|
After the upstream update, resolve conflicts in `third_party/pi/`.
|
||||||
Keep local fork changes as ordinary commits after the vendor update.
|
Keep local fork changes as ordinary commits after the vendor update.
|
||||||
|
|||||||
Reference in New Issue
Block a user