radicle-heartwood-lfs/radicle/src
Fintan Halpenny c82344496b
radicle: Improve cwd to search parents
If a `rad` command that requires an RID is executed within a
subdirectory of a Radicle project, then it will fail saying:

    ✗ Error: Current directory is not a radicle project

Improve this flow by searching parent directories and/or using the
GIT_DIR environment variable.

This is safe as long as the operations are read-only when calling
`cwd`. Currently they are:
- `Repository::open_ext` -- will not create a repository, only open
  one.
- `Repository::find_remote` -- this will only read the remote from the
  config and get the URL to parse the RID.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-10-30 15:29:37 +01:00
..
canonical Update toolchain to Rust 1.71 2023-08-09 18:49:13 +02:00
cob radicle: Apply clippy suggestions 2023-10-30 14:51:21 +01:00
identity cob: Introduce `xyz.radicle.id` COB 2023-10-12 17:32:33 +02:00
node node: Slightly increase rate limit defaults 2023-09-18 11:14:19 +02:00
storage cob: Introduce `xyz.radicle.id` COB 2023-10-12 17:32:33 +02:00
test cob: Introduce `xyz.radicle.id` COB 2023-10-12 17:32:33 +02:00
canonical.rs radicle: custom CanonicalFormatter 2023-02-24 11:59:36 +01:00
cob.rs radicle: Pin timestamp for testing 2023-10-30 14:48:38 +01:00
collections.rs Introduce `cargo-deny` 2023-08-22 14:33:00 +02:00
git.rs cob: Introduce `xyz.radicle.id` COB 2023-10-12 17:32:33 +02:00
identity.rs cob: Introduce `xyz.radicle.id` COB 2023-10-12 17:32:33 +02:00
lib.rs cob: Introduce `xyz.radicle.id` COB 2023-10-12 17:32:33 +02:00
node.rs cli: Add `node config` command 2023-09-18 11:14:19 +02:00
profile.rs cli: Auto-connect on sync 2023-08-11 11:45:27 +02:00
rad.rs radicle: Improve cwd to search parents 2023-10-30 15:29:37 +01:00
serde_ext.rs radicle: Fix config deserialization 2023-08-14 10:31:35 +02:00
sql.rs node: Keep track of connection attempts 2023-05-05 17:23:52 +02:00
storage.rs cob: Introduce `xyz.radicle.id` COB 2023-10-12 17:32:33 +02:00
test.rs cob: Improve stability of test setup 2023-10-11 14:53:59 +02:00
version.rs Add `--version` flag to binaries 2023-07-25 11:36:50 +02:00