mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 05:50:31 +08:00
This patch changes separates the business logic of fetching from the process of fetching itself. It does this through a sans-IO approach, where a `Fetcher` provides the necessary state to help drive a fetch forward, without performing any of the IO itself. What the `Fetcher` cares about is: - What nodes are going to be attempted to be fetched from - In what order should they be attempted - When should the fetching process be considered finished The `Fetcher` is then used in `radicle-cli` to drive forward the `sync::fetch` function, allowing it to only care about the IO.
1.5 KiB
1.5 KiB
We can specify where a repository gets cloned into on our filesystem
by specifying the directory in the rad clone command:
$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed Developer/Radicle
✓ Seeding policy updated for rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji with scope 'followed'
Fetching rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji from the network, found 1 potential seed(s).
✓ Target met: 1 seed(s)
✓ Creating checkout in ./Developer/Radicle..
✓ Remote alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi added
✓ Remote-tracking branch alice@z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi/master created for z6MknSL…StBU8Vi
✓ Repository successfully cloned under [..]/Developer/Radicle/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 0 issues · 0 patches │
╰────────────────────────────────────╯
Run `cd [..]/Developer/Radicle` to go to the repository directory.
Note that attempting to clone into a directory that already exists, and is not empty, will fail:
$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed Developer/Radicle
Fetching rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji from the network, found 1 potential seed(s).
✓ Target met: 1 seed(s)
✗ Error: the directory path "Developer/Radicle" already exists