cli: Add way to init from existing repositories
This adds an option to rad init to initialize a working copy with
an existing radicle repository in storage:
rad init --existing <rid>
This sets up the remote(s) and configures the repo for you.
4 files changed
+144
-12
74336f96
→
ee1c8678
added radicle-cli/examples/rad-init-existing.md
@@ -0,0 +1,40 @@
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified radicle-cli/src/commands/init.rs
@@ -18,6 +18,7 @@ use radicle::node::events::UploadPack;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -43,6 +44,7 @@ Options
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -60,6 +62,7 @@ pub struct Options {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -81,6 +84,7 @@ impl Args for Options {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -150,6 +154,12 @@ impl Args for Options {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -170,6 +180,7 @@ impl Args for Options {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -184,29 +195,38 @@ impl Args for Options {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
|
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -319,7 +339,7 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()>
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -350,6 +370,48 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()>
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-cli/tests/commands.rs
@@ -205,6 +205,28 @@ fn rad_init() {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle/src/git.rs
@@ -697,6 +697,8 @@ pub mod process {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -707,6 +709,12 @@ pub mod url {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|