mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-10-31 00:40:50 +08:00
This keeps the top level of the repo cleaner, e.g. <https://github.com/radicle-dev/heartwood> scrolls less and <https://app.radicle.xyz/nodes/rosa.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/> might show more files at the top level. This way we also don't have to explicitly name all crates in `Cargo.toml`.
2.1 KiB
2.1 KiB
Using rad patch diff, we can output the patch diff:
Hello World!
$ git checkout -b feature/1
$ git add README.md
$ git commit -m "Add README" -q
$ git push rad HEAD:refs/patches
$ rad patch diff 147309e
╭───────────────────────────╮
│ README.md +1 ❲created❳ │
├───────────────────────────┤
│ @@ -0,0 +1,1 @@ │
│ 1 + Hello World! │
╰───────────────────────────╯
If we add another file and update the patch, we can see it in the diff.
Hello Radicle!
$ git add RADICLE.md
$ git commit --amend -q
$ git push -f
$ rad patch diff 147309e
╭─────────────────────────────╮
│ RADICLE.md +1 ❲created❳ │
├─────────────────────────────┤
│ @@ -0,0 +1,1 @@ │
│ 1 + Hello Radicle! │
╰─────────────────────────────╯
╭─────────────────────────────╮
│ README.md +1 ❲created❳ │
├─────────────────────────────┤
│ @@ -0,0 +1,1 @@ │
│ 1 + Hello World! │
╰─────────────────────────────╯
Buf if we only want to see the changes from the first revision, we can do that too.
$ rad patch diff 147309e --revision 147309e
╭───────────────────────────╮
│ README.md +1 ❲created❳ │
├───────────────────────────┤
│ @@ -0,0 +1,1 @@ │
│ 1 + Hello World! │
╰───────────────────────────╯