rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood7fe1584106be32b9f2c5c153bd0d6052016dd4eb
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Updated",
"patch": {
"id": "1cd8044782249b95d577e0678f10eba8c6f32e35",
"author": {
"id": "did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz",
"alias": "lorenz"
},
"title": "A Little Less `git2`",
"state": {
"status": "draft",
"conflicts": []
},
"before": "2e77d5ef4df526a8453d38d6d2d735fe9ce7e423",
"after": "7fe1584106be32b9f2c5c153bd0d6052016dd4eb",
"commits": [
"7fe1584106be32b9f2c5c153bd0d6052016dd4eb",
"5b46299ae5bdd3515d1d737054d18f0597455729",
"1c975203888e6a3d60f21bf310898922181a95fe",
"6dfd5a3fbc74281d42e5a6171566c1b655444f84",
"0ba5356337175ac111e012a0a8002496e54107f4",
"8bfb20e10449312161862bcb89365691a024072d"
],
"target": "2e77d5ef4df526a8453d38d6d2d735fe9ce7e423",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "1cd8044782249b95d577e0678f10eba8c6f32e35",
"author": {
"id": "did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz",
"alias": "lorenz"
},
"description": "(I should write up a lengthy description\u2026)",
"base": "5caa7b302a7d4f247aaa7cc688a692aac4486464",
"oid": "d0b815c1715dfd78a7aba632356513370d189eaa",
"timestamp": 1759707360
},
{
"id": "8a36f8eecf18c0e990125564da0f89bbbbb00aa6",
"author": {
"id": "did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz",
"alias": "lorenz"
},
"description": "Make `git2` an *optional* dependency of `radicle-cob`, *no* dependency\n(also not transitively) of `radicle-crypto`, and refactor `radicle` to\ndepend on crates that in turn do not depend on `git2`\n*non-optionally*.\n\n### New Crates\n\n`radicle-git-metadata`, `radicle-git-ref-format`, and `radicle-oid` are\nintroduced. Refer to their documentation in the respective `lib.rs`.\n\n### Refactoring\n\nThe main offending dependency of `radicle-cob` is `radicle-git-ext`\nfrom the `radicle-git` workspace in repository\n(rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt) which *non-optionally* depends on\n`git2`.\n\nSo, to achieve removal of this dependency:\n\n 1. The crate is refactored to depend on the new crates\n `radicle-git-ref-format` `radicle-git-metadata`, and\n `radicle-oid` introduced in the previous commits, instead of\n `radicle-git-ext`.\n 2. Some code from the `radicle-git-ext` crate in the `radicle-git`\n workspace in repository (rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt) is\n copied. See `crates/radicle-cob/src/backend/git/commit.rs`.\n\nThis cascades to `radicle` and its dependents.\n\n Firstly, the there is an\n`impl Deref<Target=git2::Oid> for radicle_git_ext::Oid`. This made\nit very convenient to just deref to obtain the wrapped `git2::Oid`,\nso there are many expressions of the shape `*oid` in `radicle` and\nits dependents. However `radicle-oid` does not provide\n`impl Deref<Target=git2::Oid> for radicle_oid::Oid`, as notably,\n`Target` is an associated type, and not a type parameter, so an\nimplementation of `Deref` would tie the new `Oid` too tightly to a\nparticular implementation.\nInstead, work with `impl From<radicle_oid::Oid> for git2::Oid`\n(which can be enabled using the feature flag `radicle-oid/git2`).\nThis explains the changes from `*oid` to `oid.into()` at every\ntransition to \"`git2` land\".\n\n Secondly, `radicle` and its dependents are refactored to also depend\non `radicle-git-ref-format` and (much less prominently)\n`radicle-git-metadata` instead of `radicle-git-ext`\nThis is to avoid pulling in `git2` via these dependencies.\n\n Thirdly, as the re-exports in `crates/radicle/src/git.rs` change,\nthey are at the same time also cleaned up. Notably, the types from\n`radicle-git-ref-format` are re-exported under `fmt` only, not \"twice\".\nAlso, instead of re-exporting all of `git2`, the module `raw` actually\nonly provides the re-exports required to build the workspace\n(potentially breaking dependents outside the workspace, but given just\nhow many types are re-exported, this seems unlikely) and injects an\nextension trait for more ergonomic error handling. Uses of\n`radicle_git_ext::Error` are replaced with uses of the extension trait.\n\nWhile overall this obviously is very much a breaking change, these\nchanges should mostly amount to changing from `Deref` to `Into`, i.e.,\n`*oid` \u2192 `oid.into()`, importing the extension trait as necessary, and\nrewriting imports for `radicle::git::fmt`. This is indicated by the\nmostly mechanical nature of the changes to\n`crates/radicle-{cli,node,remote-helper}`.",
"base": "2e77d5ef4df526a8453d38d6d2d735fe9ce7e423",
"oid": "7fe1584106be32b9f2c5c153bd0d6052016dd4eb",
"timestamp": 1759877418
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "27a57c09-b6ba-4462-a479-b31ca6c46e4a"
},
"info_url": "https://cci.rad.levitte.org//27a57c09-b6ba-4462-a479-b31ca6c46e4a.html"
}
Started at: 2025-10-08 00:53:39.768716+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 124 issues · 24 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 1cd8044782249b95d577e0678f10eba8c6f32e35
✓ Switched to branch patch/1cd8044 at revision 8a36f8e
✓ Branch patch/1cd8044 setup to track rad/patches/1cd8044782249b95d577e0678f10eba8c6f32e35
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 7fe1584106be32b9f2c5c153bd0d6052016dd4eb
HEAD is now at 7fe15841 workspace: Enable vendored `libgit2`
Exit code: 0
$ git show 7fe1584106be32b9f2c5c153bd0d6052016dd4eb
commit 7fe1584106be32b9f2c5c153bd0d6052016dd4eb
Author: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
Date: Sun Oct 5 14:10:45 2025 +0200
workspace: Enable vendored `libgit2`
Multiple crates are enabling this feature. Do that at the workspace
level.
diff --git a/Cargo.toml b/Cargo.toml
index 3e910b57..f8a23539 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,7 +28,7 @@ crossbeam-channel = "0.5.6"
cyphernet = "0.5.2"
dunce = "1.0.5"
fastrand = { version = "2.0.0", default-features = false }
-git2 = { version = "0.19.0", default-features = false }
+git2 = { version = "0.19.0", default-features = false, features = ["vendored-libgit2"] }
human-panic = "2"
itertools = "0.14"
lexopt = "0.3.0"
diff --git a/crates/radicle-cob/Cargo.toml b/crates/radicle-cob/Cargo.toml
index a598acb5..59c216e5 100644
--- a/crates/radicle-cob/Cargo.toml
+++ b/crates/radicle-cob/Cargo.toml
@@ -22,7 +22,7 @@ test = []
[dependencies]
fastrand = { workspace = true }
git-ref-format-core = { workspace = true }
-git2 = { workspace = true, optional = true, features = ["vendored-libgit2"] }
+git2 = { workspace = true, optional = true }
log = { workspace = true }
nonempty = { workspace = true, features = ["serialize"] }
radicle-crypto = { workspace = true, features = ["ssh"] }
diff --git a/crates/radicle-term/Cargo.toml b/crates/radicle-term/Cargo.toml
index 2d5ddc28..512e4358 100644
--- a/crates/radicle-term/Cargo.toml
+++ b/crates/radicle-term/Cargo.toml
@@ -24,7 +24,7 @@ thiserror = { workspace = true }
unicode-display-width = "0.3.0"
unicode-segmentation = "1.7.1"
zeroize = { workspace = true }
-git2 = { workspace = true, features = ["vendored-libgit2"], optional = true }
+git2 = { workspace = true, optional = true }
shlex = { workspace = true }
[target.'cfg(unix)'.dependencies]
diff --git a/crates/radicle/Cargo.toml b/crates/radicle/Cargo.toml
index 4701c000..c3857130 100644
--- a/crates/radicle/Cargo.toml
+++ b/crates/radicle/Cargo.toml
@@ -26,7 +26,7 @@ cyphernet = { workspace = true, features = ["tor", "dns", "p2p-ed25519"] }
dunce = { workspace = true }
fast-glob = { version = "0.3.2" }
fastrand = { workspace = true }
-git2 = { workspace = true, features = ["vendored-libgit2"] }
+git2 = { workspace = true }
indexmap = { version = "2", features = ["serde"] }
localtime = { workspace = true, features = ["serde"] }
log = { workspace = true, features = ["std"] }
Exit code: 0
shell: 'export RUSTDOCFLAGS=''-D warnings'' cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 27a57c09-b6ba-4462-a479-b31ca6c46e4a -v /opt/radcis/ci.rad.levitte.org/cci/state/27a57c09-b6ba-4462-a479-b31ca6c46e4a/s:/27a57c09-b6ba-4462-a479-b31ca6c46e4a/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/27a57c09-b6ba-4462-a479-b31ca6c46e4a/w:/27a57c09-b6ba-4462-a479-b31ca6c46e4a/w -w /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /27a57c09-b6ba-4462-a479-b31ca6c46e4a/s/script.sh
+ export 'RUSTDOCFLAGS=-D warnings'
+ RUSTDOCFLAGS='-D warnings'
+ cargo --version
info: syncing channel updates for '1.88-x86_64-unknown-linux-gnu'
info: latest update on 2025-06-26, rust version 1.88.0 (6b00bc388 2025-06-23)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.88.0 (873a06493 2025-05-10)
+ rustc --version
rustc 1.88.0 (6b00bc388 2025-06-23)
+ cargo fmt --check
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/common.rs:9:
use serde::{Deserialize, Serialize};
use thiserror::Error;
-use crate::prelude::{Did, PublicKey};
use crate::git::Oid;
+use crate::prelude::{Did, PublicKey};
/// Timestamp used for COB operations.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/external.rs:92:
use crate::cob::object::collaboration::Evaluate;
use crate::cob::op::{Op as CobOp, OpEncodingError};
use crate::cob::store::{Cob, CobAction};
-use crate::storage::ReadRepository;
use crate::git::Oid;
+use crate::storage::ReadRepository;
/// This prefix is used to generate the name of the command,
/// which is executed by the helper to apply operations.
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/identity.rs:7:
use serde::{Deserialize, Serialize};
use thiserror::Error;
+use crate::git::Oid;
use crate::identity::doc::Doc;
use crate::node::device::Device;
use crate::node::NodeId;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/identity.rs:13:
use crate::storage;
-use crate::git::Oid;
use crate::{
cob,
cob::{
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/issue.rs:982:
use super::*;
use crate::cob::{store::CobWithType, ActorId, Reaction};
+ use crate::git::Oid;
use crate::issue::cache::Issues as _;
use crate::test::arbitrary;
- use crate::git::Oid;
use crate::{assert_matches, test};
#[test]
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/patch.rs:2001:
}
/// Merge a patch revision.
- pub fn merge(&mut self, revision: RevisionId, commit: crate::git::Oid) -> Result<(), store::Error> {
+ pub fn merge(
+ &mut self,
+ revision: RevisionId,
+ commit: crate::git::Oid,
+ ) -> Result<(), store::Error> {
self.push(Action::Merge { revision, commit })
}
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/test.rs:12:
use crate::cob::{patch, Title};
use crate::cob::{Entry, History, Manifest, Timestamp, Version};
use crate::crypto::Signer;
+use crate::git::Oid;
use crate::node::device::Device;
use crate::prelude::Did;
use crate::profile::env;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/test.rs:18:
use crate::storage::ReadRepository;
use crate::test::arbitrary;
-use crate::git::Oid;
use super::store::{Cob, CobWithType};
use super::thread;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/test.rs:178:
"nonce": fastrand::u64(..),
}))
.unwrap();
- let oid = crate::git::raw::Oid::hash_object(crate::git::raw::ObjectType::Blob, &data).unwrap();
+ let oid =
+ crate::git::raw::Oid::hash_object(crate::git::raw::ObjectType::Blob, &data).unwrap();
let id = oid.into();
let author = *self.signer.public_key();
let actions = NonEmpty::from_vec(actions).unwrap();
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/cob/test.rs:279:
.to_string();
let hash =
- crate::git::raw::Oid::hash_object(crate::git::raw::ObjectType::Commit, commit.as_bytes()).unwrap();
+ crate::git::raw::Oid::hash_object(crate::git::raw::ObjectType::Commit, commit.as_bytes())
+ .unwrap();
(data, hash.into())
}
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git/canonical/convergence.rs:1:
use std::{fmt, ops::ControlFlow};
-use crate::prelude::Did;
use crate::git::Oid;
+use crate::prelude::Did;
use super::{effects, error, Object};
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git/canonical/effects.rs:3:
use crate::git;
use crate::git::fmt::Qualified;
use crate::git::raw::ErrorExt as _;
-use crate::prelude::Did;
use crate::git::Oid;
+use crate::prelude::Did;
use super::{FoundObjects, GraphAheadBehind, MergeBase, Object};
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git/canonical/rules.rs:22:
use crate::git;
use crate::git::canonical;
use crate::git::canonical::Canonical;
+use crate::git::fmt::refspec::QualifiedPattern;
use crate::git::fmt::Qualified;
use crate::git::fmt::{refname, RefString};
-use crate::git::fmt::refspec::QualifiedPattern;
use crate::identity::{doc, Did};
const ASTERISK: char = '*';
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git/canonical/rules.rs:781:
doc.delegates().clone()
}
- fn tag(name: RefString, head: crate::git::Oid, repo: &crate::git::raw::Repository) -> crate::git::Oid {
+ fn tag(
+ name: RefString,
+ head: crate::git::Oid,
+ repo: &crate::git::raw::Repository,
+ ) -> crate::git::Oid {
let commit = fixtures::commit(name.as_str(), &[head], repo);
let target = repo.find_object(commit.into(), None).unwrap();
let tagger = repo.signature().unwrap();
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git/raw.rs:1:
//! This module re-exports selected items from the [`git2`] crate and provides
//! an extension trait for its [`git2::Error`] type to more conveniently handle
//! errors associated with the code [`git2::ErrorCode::NotFound`].
-//!
+//!
// Re-exports created by manually scanning the `heartwood` workspace on 2025-10-04.
// Re-exports that are only used within this crate.
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git/raw.rs:8:
pub(crate) use git2::{
- message_trailers_strs,
-
- AutotagOption, Blob,
- Config,
- FetchOptions,
- FetchPrune,
- Object,
- RemoteCallbacks,
- Revwalk,
- Sort,
+ message_trailers_strs, AutotagOption, Blob, Config, FetchOptions, FetchPrune, Object,
+ RemoteCallbacks, Revwalk, Sort,
};
// Re-exports that are used by other crates in the workspace, including this crate.
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git/raw.rs:22:
pub use git2::{
- Repository,
- RepositoryInitOptions,
- Error, ErrorClass, ErrorCode,
- BranchType,
- Commit,
+ Branch, BranchType, Commit, Direction, Error, ErrorClass, ErrorCode, FileMode, ObjectType, Oid,
+ Reference, Remote, Repository, RepositoryInitOptions, RepositoryOpenFlags, Signature, Time,
Tree,
- Oid,
- Direction,
- Reference,
- Signature,
- Remote,
- ObjectType,
- Branch,
- RepositoryOpenFlags,
- Time,
- FileMode,
};
// Re-exports that are used by other crates in the workspace, but *not* this crate.
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git/raw.rs:42:
pub use git2::{
- MergeAnalysis, MergeOptions,
- AnnotatedCommit,
- Diff, DiffFindOptions, DiffOptions, DiffStats,
+ AnnotatedCommit, Diff, DiffFindOptions, DiffOptions, DiffStats, MergeAnalysis, MergeOptions,
};
// Re-exports for `radicle-cli`.
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git.rs:181:
use radicle_cob as cob;
- use super::*;
use super::fmt::*;
+ use super::*;
/// Try to get a qualified reference from a generic reference.
- pub fn qualified_from<'a>(
- r: &'a raw::Reference,
- ) -> Result<(Qualified<'a>, Oid), RefError> {
+ pub fn qualified_from<'a>(r: &'a raw::Reference) -> Result<(Qualified<'a>, Oid), RefError> {
let name = r.name().ok_or(RefError::InvalidName)?;
let refstr = RefStr::try_from_str(name)?;
let target = r.resolve()?.target().ok_or(RefError::NoTarget)?;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git.rs:380:
///
/// `refs/namespaces/*/refs/drafts/cobs/<typename>/<object_id>`
///
- pub fn cobs(typename: &cob::TypeName, object_id: &cob::ObjectId) -> refspec::PatternString {
+ pub fn cobs(
+ typename: &cob::TypeName,
+ object_id: &cob::ObjectId,
+ ) -> refspec::PatternString {
pattern!("refs/namespaces/*")
.join(refname!("refs/drafts/cobs"))
.join(Component::from(typename))
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/git.rs:742:
Ok(())
}
-pub fn init_default_branch(
- repo: &raw::Repository,
-) -> Result<Option<String>, raw::Error> {
+pub fn init_default_branch(repo: &raw::Repository) -> Result<Option<String>, raw::Error> {
let config = repo.config().and_then(|mut c| c.snapshot())?;
let default_branch = config.get_str("init.defaultbranch")?;
let branch = repo.find_branch(default_branch, raw::BranchType::Local)?;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/identity/doc.rs:1154:
let remote = arbitrary::gen::<RemoteId>(1);
let proj = arbitrary::gen::<RepoId>(1);
let repo = storage.create(proj).unwrap();
- let oid = crate::git::raw::Oid::from_str("2d52a53ce5e4f141148a5f770cfd3ead2d6a45b8").unwrap();
+ let oid =
+ crate::git::raw::Oid::from_str("2d52a53ce5e4f141148a5f770cfd3ead2d6a45b8").unwrap();
let err = repo.identity_head_of(&remote).unwrap_err();
{
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/identity/project.rs:7:
use thiserror::Error;
use crate::crypto;
+use crate::git::BranchName;
use crate::identity::doc;
use crate::identity::doc::Payload;
-use crate::git::BranchName;
pub use crypto::PublicKey;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/lib.rs:42:
use super::*;
pub use crypto::{PublicKey, Verified};
+ pub use git::BranchName;
pub use identity::{project::Project, Did, Doc, RawDoc, RepoId};
pub use node::{Alias, NodeId, Timestamp};
pub use profile::Profile;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/lib.rs:48:
- pub use git::BranchName;
- pub use storage::{
- ReadRepository, ReadStorage, SignRepository, WriteRepository, WriteStorage,
- };
+ pub use storage::{ReadRepository, ReadStorage, SignRepository, WriteRepository, WriteStorage};
}
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/events.rs:10:
use crossbeam_channel as chan;
use crate::git::fmt::Qualified;
+use crate::git::Oid;
use crate::node;
use crate::prelude::*;
use crate::storage::{refs, RefUpdate};
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/events.rs:16:
-use crate::git::Oid;
/// Maximum unconsumed events allowed per subscription.
pub const MAX_PENDING_EVENTS: usize = 8192;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/notifications/store.rs:11:
use crate::git;
use crate::git::fmt::RefString;
+use crate::git::Oid;
use crate::git::RefError;
use crate::prelude::RepoId;
use crate::sql::transaction;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/notifications/store.rs:17:
use crate::storage::RefUpdate;
-use crate::git::Oid;
use super::{
Notification, NotificationId, NotificationKind, NotificationKindError, NotificationStatus,
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/refs/store.rs:7:
use thiserror::Error;
use crate::git::fmt::Qualified;
+use crate::git::Oid;
use crate::node::Database;
use crate::node::NodeId;
use crate::prelude::RepoId;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/refs/store.rs:13:
use crate::storage;
use crate::storage::{ReadRepository, ReadStorage, RemoteRepository, RepositoryError};
-use crate::git::Oid;
#[derive(Error, Debug)]
pub enum Error {
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/seed/store.rs:5:
use sqlite as sql;
use thiserror::Error;
+use crate::git::Oid;
use crate::node::address;
use crate::node::address::Store as _;
use crate::node::NodeId;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/seed/store.rs:11:
use crate::node::{seed::SyncedSeed, Database, SyncedAt};
use crate::prelude::{RepoId, Timestamp};
-use crate::git::Oid;
#[derive(Error, Debug)]
pub enum Error {
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/seed.rs:25:
impl SyncedAt {
/// Load a new [`SyncedAt`] for the given remote.
- pub fn load<S: ReadRepository>(repo: &S, remote: RemoteId) -> Result<Self, crate::git::raw::Error> {
+ pub fn load<S: ReadRepository>(
+ repo: &S,
+ remote: RemoteId,
+ ) -> Result<Self, crate::git::raw::Error> {
let refs = RefsAt::new(repo, remote)?;
let oid = refs.at;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/node/seed.rs:33:
}
/// Create a new [`SyncedAt`] given an OID, by looking up the timestamp in the repo.
- pub fn new<S: ReadRepository>(oid: crate::git::Oid, repo: &S) -> Result<Self, crate::git::raw::Error> {
+ pub fn new<S: ReadRepository>(
+ oid: crate::git::Oid,
+ repo: &S,
+ ) -> Result<Self, crate::git::raw::Error> {
let timestamp = repo.commit(oid)?.time();
let timestamp = LocalTime::from_secs(timestamp.seconds() as u64);
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/git/transport/local.rs:30:
&self,
url: &str,
service: crate::git::raw::transport::Service,
- ) -> Result<Box<dyn crate::git::raw::transport::SmartSubtransportStream>, crate::git::raw::Error> {
- let url =
- Url::from_str(url).map_err(|e| crate::git::raw::Error::from_str(e.to_string().as_str()))?;
+ ) -> Result<Box<dyn crate::git::raw::transport::SmartSubtransportStream>, crate::git::raw::Error>
+ {
+ let url = Url::from_str(url)
+ .map_err(|e| crate::git::raw::Error::from_str(e.to_string().as_str()))?;
let service: &str = match service {
crate::git::raw::transport::Service::UploadPack
| crate::git::raw::transport::Service::UploadPackLs => "upload-pack",
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/git/transport/remote/mock.rs:24:
&self,
url: &str,
service: crate::git::raw::transport::Service,
- ) -> Result<Box<dyn crate::git::raw::transport::SmartSubtransportStream>, crate::git::raw::Error> {
- let url =
- Url::from_str(url).map_err(|e| crate::git::raw::Error::from_str(e.to_string().as_str()))?;
+ ) -> Result<Box<dyn crate::git::raw::transport::SmartSubtransportStream>, crate::git::raw::Error>
+ {
+ let url = Url::from_str(url)
+ .map_err(|e| crate::git::raw::Error::from_str(e.to_string().as_str()))?;
let id = thread::current().id();
let nodes = NODES.lock().expect("lock cannot be poisoned");
let storage = if let Some(storage) = nodes.get(&(id, url.node)) {
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/git.rs:27:
ReadRepository, ReadStorage, Remote, Remotes, RepositoryInfo, SetHead, SignRepository,
WriteRepository, WriteStorage,
};
-use crate::{git, node, git::Oid};
+use crate::{git, git::Oid, node};
use crate::git::fmt::{
refname, refspec, refspec::PatternStr, refspec::PatternString, Qualified, RefString,
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/git.rs:542:
pub fn remote_ids(
&self,
- ) -> Result<impl Iterator<Item = Result<RemoteId, refs::Error>> + '_, crate::git::raw::Error> {
+ ) -> Result<impl Iterator<Item = Result<RemoteId, refs::Error>> + '_, crate::git::raw::Error>
+ {
let iter = self.backend.references_glob(SIGREFS_GLOB.as_str())?.map(
|reference| -> Result<RemoteId, refs::Error> {
let r = reference?;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/git.rs:991:
}
pub fn parse_signatures(msg: &str) -> Result<HashMap<PublicKey, Signature>, Error> {
- let trailers =
- crate::git::raw::message_trailers_strs(msg).map_err(|_| Error::SignatureTrailerFormat)?;
+ let trailers = crate::git::raw::message_trailers_strs(msg)
+ .map_err(|_| Error::SignatureTrailerFormat)?;
let mut signatures = HashMap::with_capacity(trailers.len());
for (key, val) in trailers.iter() {
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/git.rs:1102:
let (rid, _, working, _) =
fixtures::project(tmp.path().join("project"), &storage, &signer).unwrap();
let stored = storage.repository(rid).unwrap();
- let sig = crate::git::raw::Signature::now(&alice.to_string(), "anonymous@radicle.example.com")
- .unwrap();
+ let sig =
+ crate::git::raw::Signature::now(&alice.to_string(), "anonymous@radicle.example.com")
+ .unwrap();
let head = working.head().unwrap().peel_to_commit().unwrap();
git::commit(
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/refs.rs:14:
use crate::git;
use crate::git::raw::ErrorExt as _;
+use crate::git::Oid;
use crate::node::device::Device;
use crate::profile::env;
use crate::storage;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/refs.rs:20:
use crate::storage::{ReadRepository, RemoteId, RepoId, WriteRepository};
-use crate::git::Oid;
pub use crate::git::refs::storage::*;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage/refs.rs:386:
}
impl RefsAt {
- pub fn new<S: ReadRepository>(repo: &S, remote: RemoteId) -> Result<Self, crate::git::raw::Error> {
+ pub fn new<S: ReadRepository>(
+ repo: &S,
+ remote: RemoteId,
+ ) -> Result<Self, crate::git::raw::Error> {
let at = repo.reference_oid(&remote, &storage::refs::SIGREFS_BRANCH)?;
Ok(RefsAt { remote, at })
}
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage.rs:18:
use crate::collections::RandomMap;
use crate::git::canonical;
use crate::git::fmt::{refspec::PatternString, refspec::Refspec, Qualified, RefStr, RefString};
-use crate::git::RefError;
use crate::git::raw::ErrorExt as _;
+use crate::git::RefError;
use crate::identity::{doc, Did, PayloadError};
use crate::identity::{Doc, DocAt, DocError};
use crate::identity::{Identity, RepoId};
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/storage.rs:30:
use self::refs::{RefsAt, SignedRefs};
use crate::git::UserInfo;
-
/// Basic repository information.
#[derive(Debug, Clone, PartialEq, Eq)]
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/test/fixtures.rs:161:
}
/// Create an empty commit on the current branch.
-pub fn commit(msg: &str, parents: &[crate::git::Oid], repo: &crate::git::raw::Repository) -> crate::git::Oid {
+pub fn commit(
+ msg: &str,
+ parents: &[crate::git::Oid],
+ repo: &crate::git::raw::Repository,
+) -> crate::git::Oid {
let head = repo.head().unwrap();
let sig = crate::git::raw::Signature::new(
USER_NAME,
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle/src/test/fixtures.rs:266:
}
/// Creates a regular repository at the given path with a couple of commits.
- pub fn repository<P: AsRef<Path>>(path: P) -> (crate::git::raw::Repository, crate::git::raw::Oid) {
+ pub fn repository<P: AsRef<Path>>(
+ path: P,
+ ) -> (crate::git::raw::Repository, crate::git::raw::Oid) {
let repo = crate::git::raw::Repository::init_opts(
path,
crate::git::raw::RepositoryInitOptions::new().external_template(false),
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-cli/src/commands/inbox.rs:6:
use localtime::LocalTime;
use radicle::cob::TypedId;
-use radicle::git::BranchName;
use radicle::git::fmt::Qualified;
+use radicle::git::BranchName;
use radicle::identity::Identity;
use radicle::issue::cache::Issues as _;
use radicle::node::notifications;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-cli/src/commands/patch/checkout.rs:58:
let mut spinner = term::spinner("Performing checkout...");
let patch_branch = opts.branch(patch_id)?;
- let commit = match working.find_branch(patch_branch.as_str(), radicle::git::raw::BranchType::Local)
- {
- Ok(branch) if opts.force => {
- let commit = find_patch_commit(revision, stored, working)?;
- let mut r = branch.into_reference();
- r.set_target(commit.id(), &format!("force update '{patch_branch}'"))?;
- commit
- }
- Ok(branch) => {
- let head = branch.get().peel_to_commit()?;
- if revision.head() != head.id() {
- anyhow::bail!(
- "branch '{patch_branch}' already exists (use `--force` to overwrite)"
- );
+ let commit =
+ match working.find_branch(patch_branch.as_str(), radicle::git::raw::BranchType::Local) {
+ Ok(branch) if opts.force => {
+ let commit = find_patch_commit(revision, stored, working)?;
+ let mut r = branch.into_reference();
+ r.set_target(commit.id(), &format!("force update '{patch_branch}'"))?;
+ commit
}
- head
- }
- Err(e) if e.is_not_found() => {
- let commit = find_patch_commit(revision, stored, working)?;
- // Create patch branch and switch to it.
- working.branch(patch_branch.as_str(), &commit, true)?;
- commit
- }
- Err(e) => return Err(e.into()),
- };
+ Ok(branch) => {
+ let head = branch.get().peel_to_commit()?;
+ if revision.head() != head.id() {
+ anyhow::bail!(
+ "branch '{patch_branch}' already exists (use `--force` to overwrite)"
+ );
+ }
+ head
+ }
+ Err(e) if e.is_not_found() => {
+ let commit = find_patch_commit(revision, stored, working)?;
+ // Create patch branch and switch to it.
+ working.branch(patch_branch.as_str(), &commit, true)?;
+ commit
+ }
+ Err(e) => return Err(e.into()),
+ };
if opts.force {
let mut builder = radicle::git::raw::build::CheckoutBuilder::new();
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-cli/src/commands/patch/review/builder.rs:24:
use radicle::crypto;
use radicle::git;
use radicle::git::raw;
+use radicle::git::Oid;
use radicle::node::device::Device;
use radicle::prelude::*;
use radicle::storage::git::{cob::DraftStore, Repository};
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-cli/src/commands/patch/review/builder.rs:30:
-use radicle::git::Oid;
use radicle_surf::diff::*;
use radicle_term::{Element, VStack};
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-cli/src/commands/patch/update.rs:1:
use radicle::cob::patch;
use radicle::git::raw;
+use radicle::git::Oid;
use radicle::prelude::*;
use radicle::storage::git::Repository;
-use radicle::git::Oid;
use crate::terminal as term;
use crate::terminal::patch::*;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-cli/src/git.rs:20:
use radicle::crypto::ssh;
use radicle::git;
-use radicle::git::{Version, VERSION_REQUIRED};
use radicle::git::raw;
+use radicle::git::{Version, VERSION_REQUIRED};
use radicle::prelude::{NodeId, RepoId};
use radicle::storage::git::transport;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-cli/src/terminal/patch/common.rs:2:
use radicle::git;
use radicle::git::raw;
+use radicle::git::Oid;
use radicle::prelude::*;
use radicle::storage::git::Repository;
-use radicle::git::Oid;
use crate::terminal as term;
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-fetch/src/git/repository/error.rs:1:
+use radicle::git::raw;
use radicle::git::{
fmt::{Namespaced, Qualified},
Oid,
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-fetch/src/git/repository/error.rs:4:
};
-use radicle::git::raw;
use thiserror::Error;
#[derive(Debug, Error)]
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-fetch/src/git/repository.rs:1:
pub mod error;
use either::Either;
+use radicle::git::raw;
use radicle::git::{
fmt::{Namespaced, Qualified},
Oid,
Diff in /27a57c09-b6ba-4462-a479-b31ca6c46e4a/w/crates/radicle-fetch/src/git/repository.rs:7:
};
-use radicle::git::raw;
use radicle::storage::git::Repository;
use super::refs::{Applied, Policy, RefUpdate, Update};
Exit code: 1
{
"response": "finished",
"result": "failure"
}