mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-10-26 23:00:37 +08:00
Previously, COB change commits would not distinguish between their parents. This means that they would try to load source code commits (eg. for patch COBs) and then fail since those commits wouldn't have a manifest or `Rad-Resource`. We introduce a backwards compatible change here which is that parent oids that are not COB commits are accompanied by a commit trailer called `Rad-Related`. This is for all related content that should be pulled in but is not part of the change graph proper. When building the change graph, we simply ignore commits that are marked as "related".
4.5 KiB
4.5 KiB
Let's say we have some changes in a branch:
$ git checkout -b cloudhead/draft
$ git commit -a -m "Nothing to see here.." -q --allow-empty
To open a patch in draft mode, we use the --draft option:
$ git push -o patch.draft -o patch.message="Nothing yet" rad HEAD:refs/patches
✓ Patch b5df71076ba95d80acb1de3a13f94995632df95e drafted
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
* [new reference] HEAD -> refs/patches
We can confirm it's a draft by running show:
$ rad patch show b5df71076ba95d80acb1de3a13f94995632df95e
╭────────────────────────────────────────────────────╮
│ Title Nothing yet │
│ Patch b5df71076ba95d80acb1de3a13f94995632df95e │
│ Author z6MknSL…StBU8Vi (you) │
│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
│ Branches cloudhead/draft │
│ Commits ahead 1, behind 0 │
│ Status draft │
├────────────────────────────────────────────────────┤
│ 2a46583 Nothing to see here.. │
├────────────────────────────────────────────────────┤
│ ● opened by z6MknSL…StBU8Vi (you) (2a46583) [ .. ] │
╰────────────────────────────────────────────────────╯
Once the patch is ready for review, we can use the ready command:
$ rad patch ready b5df71076ba95d80acb1de3a13f94995632df95e --no-announce
$ rad patch show b5df71076ba95d80acb1de3a13f94995632df95e
╭────────────────────────────────────────────────────╮
│ Title Nothing yet │
│ Patch b5df71076ba95d80acb1de3a13f94995632df95e │
│ Author z6MknSL…StBU8Vi (you) │
│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
│ Branches cloudhead/draft │
│ Commits ahead 1, behind 0 │
│ Status open │
├────────────────────────────────────────────────────┤
│ 2a46583 Nothing to see here.. │
├────────────────────────────────────────────────────┤
│ ● opened by z6MknSL…StBU8Vi (you) (2a46583) [ .. ] │
╰────────────────────────────────────────────────────╯
If for whatever reason, it needed to go back into draft mode, we could use
the --undo flag:
$ rad patch ready --undo b5df71076ba95d80acb1de3a13f94995632df95e --no-announce
$ rad patch show b5df71076ba95d80acb1de3a13f94995632df95e
╭────────────────────────────────────────────────────╮
│ Title Nothing yet │
│ Patch b5df71076ba95d80acb1de3a13f94995632df95e │
│ Author z6MknSL…StBU8Vi (you) │
│ Head 2a465832b5a76abe25be44a3a5d224bbd7741ba7 │
│ Branches cloudhead/draft │
│ Commits ahead 1, behind 0 │
│ Status draft │
├────────────────────────────────────────────────────┤
│ 2a46583 Nothing to see here.. │
├────────────────────────────────────────────────────┤
│ ● opened by z6MknSL…StBU8Vi (you) (2a46583) [ .. ] │
╰────────────────────────────────────────────────────╯