| 1 | usage: valley ready [--head <sha>] [--change <id>] [--if-active <sha>] [--stamp] [<branch>] |
| 2 | |
| 3 | ready [--head <sha>] [--change <id>] [--if-active <sha>] [--stamp] [<branch>] |
| 4 | mark a head of the branch ready, as a new version of its |
| 5 | change, in the change's record on origin: |
| 6 | refs/the-valley/changes/main/<change id>. the branch |
| 7 | defaults to the current one. the head is --head, or else |
| 8 | origin/<branch>, and it must be on origin already. the |
| 9 | first ready of a change makes v1; each later one adds |
| 10 | the next version, at a head other than the active |
| 11 | version's. a draft or a withdrawn change comes back this |
| 12 | way: at the active version's head, it is ready again at |
| 13 | that version, and at another head it gains the next |
| 14 | version. prints the handle and version, e.g. |
| 15 | `app nxvp v2 ready`. |
| 16 | the change id is --change, else the head commit's jj |
| 17 | change-id header, else a Change-Id: trailer in its |
| 18 | message, else the sole live (ready or draft, unlanded) |
| 19 | change on origin whose active version is on this branch, |
| 20 | else a new one, which is printed. when the branch names |
| 21 | the change, ready prints one line naming its handle; |
| 22 | more than one live change on the branch is refused, |
| 23 | asking for --change. a header and a trailer that |
| 24 | disagree are refused. so is a change whose commits from |
| 25 | its merge base with origin/main hold a merge, or that |
| 26 | has more than one merge base. when the merge base is |
| 27 | behind origin/main and main touches any path the change |
| 28 | touches, ready warns on stderr and still proceeds. |
| 29 | --if-active SHA |
| 30 | add the version only while the change |
| 31 | is ready at an active version whose head |
| 32 | is SHA. the record ref is leased on the |
| 33 | record read, so nothing comes between |
| 34 | that check and the write. rebase readies |
| 35 | the head it rebased this way. |
| 36 | --stamp amend the head of your local branch to |
| 37 | carry the id as a Change-Id: trailer and |
| 38 | push the branch, leased, before marking it |
| 39 | ready. it only starts a new change: it |
| 40 | is refused for a change that has a |
| 41 | record on origin already, and for a head |
| 42 | already on origin. |
| 43 | the record names the principal your key pushes as, read |
| 44 | from git config valley.principal; the host refuses one |
| 45 | naming anyone else. the record ref is pushed leased on |
| 46 | the value read. a new change is owned by the principal |
| 47 | that readies it, and a later version may come from its |
| 48 | owner, the operator, or a restack holder while the |
| 49 | change is ready. |
| 50 | a record never makes anything land, and approve is |
| 51 | still the only way to main. the integrator reads |
| 52 | records only to refuse: it lands no request that would |
| 53 | bring a version of a change that is not ready. |