Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli/patch/diff: Remove
Lorenz Leutgeb committed 7 months ago
commit 7272a48a833a1023360cd96cbe74d6b26a05134c
parent ac572e64e5029cb1db16f05158915b6ef55ab7e7
2 files changed +29 -29
modified crates/radicle-cli/examples/rad-patch-diff.md
@@ -11,13 +11,13 @@ $ git push rad HEAD:refs/patches
```
```
$ rad patch diff 147309e
-
╭───────────────────────────╮
-
│ README.md +1 ❲created❳    │
-
├───────────────────────────┤
-
│ @@ -0,0 +1,1 @@           │
-
│      1     + Hello World! │
-
╰───────────────────────────╯
-

+
diff --git a/README.md b/README.md
+
new file mode 100644
+
index 0000000..980a0d5
+
--- /dev/null
+
+++ b/README.md
+
@@ -0,0 +1 @@
+
+Hello World!
```

If we add another file and update the patch, we can see it in the diff.
@@ -32,20 +32,20 @@ $ 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!   │
-
╰─────────────────────────────╯
-

+
diff --git a/RADICLE.md b/RADICLE.md
+
new file mode 100644
+
index 0000000..e517184
+
--- /dev/null
+
+++ b/RADICLE.md
+
@@ -0,0 +1 @@
+
+Hello Radicle!
+
diff --git a/README.md b/README.md
+
new file mode 100644
+
index 0000000..980a0d5
+
--- /dev/null
+
+++ b/README.md
+
@@ -0,0 +1 @@
+
+Hello World!
```

Buf if we only want to see the changes from the first revision, we can do that
@@ -53,11 +53,11 @@ too.

```
$ rad patch diff 147309e --revision 147309e
-
╭───────────────────────────╮
-
│ README.md +1 ❲created❳    │
-
├───────────────────────────┤
-
│ @@ -0,0 +1,1 @@           │
-
│      1     + Hello World! │
-
╰───────────────────────────╯
-

+
diff --git a/README.md b/README.md
+
new file mode 100644
+
index 0000000..980a0d5
+
--- /dev/null
+
+++ b/README.md
+
@@ -0,0 +1 @@
+
+Hello World!
```
modified crates/radicle-cli/src/commands/patch/diff.rs
@@ -25,7 +25,7 @@ pub fn run(
    };
    let (from, to) = revision.range();

-
    process::Command::new("rad")
+
    process::Command::new("git")
        .current_dir(stored.path())
        .args(["diff", from.to_string().as_str(), to.to_string().as_str()])
        .stdout(process::Stdio::inherit())