Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: fix update hint
Fintan Halpenny committed 2 years ago
commit f9d9bdf8cd07861187cc335a1f5f57ff64316c79
parent 9cf6fab7c8bd043a2fcd7d10eeb7ebf7bdb5e2fc
2 files changed +5 -2
modified radicle-cli/examples/rad-patch-via-push.md
@@ -10,7 +10,7 @@ $ git commit -a -m "Add things" -q --allow-empty
$ git push -o patch.message="Add things #1" -o patch.message="See commits for details." rad HEAD:refs/patches
✓ Patch 82faae29b2a2f11bf45bbba4c4787d6b32a12447 opened
hint: to update, run `git push`,
-
      or `git push rad -f HEAD:rad/patches/82faae29b2a2f11bf45bbba4c4787d6b32a12447`
+
      or `git push rad -f HEAD:patches/82faae29b2a2f11bf45bbba4c4787d6b32a12447`
hint: offline push, your node is not running
      to sync with the network, run `rad node start`
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
@@ -112,7 +112,7 @@ $ git commit -a -m "Improve code" -q --allow-empty
```

``` (stderr)
-
$ git push
+
$ git push rad
✓ Patch b77b2e8 updated to 8d6692ce2b2219a54d09ccd5feefedb2bae33eba
To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
   8b0ea80..02bef3f  feature/2 -> patches/b77b2e8a05adcdc859a0184f7db859df1c6686b6
modified radicle-remote-helper/src/push.rs
@@ -394,6 +394,9 @@ fn patch_open<G: Signer>(
            {
                if let Some(name) = branch.name()? {
                    if profile.hints() {
+
                        // Remove the remote portion of the name, i.e.
+
                        // rad/patches/deadbeef -> patches/deadbeef
+
                        let name = name.split('/').skip(1).collect::<Vec<_>>().join("/");
                        eprintln!("hint: to update, run `git push`,");
                        eprintln!("      or `git push rad -f HEAD:{name}`");
                    }