Improvements to Git OID Handling
With Git 3 on the horizon, which will make SHA-256 object identifiers the default, this patch implements first steps to prepare integration of SHA-256 by means of a clean up around code locations that will be affected.
13 files changed
+66
-80
aa177b04
→
bda92b21
modified crates/radicle-cli/src/commands/watch.rs
@@ -42,7 +42,7 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/git/unified_diff.rs
@@ -336,7 +336,7 @@ impl Encode for FileHeader {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -358,7 +358,7 @@ impl Encode for FileHeader {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-core/src/repo.rs
@@ -14,8 +14,8 @@ pub const RAD_PREFIX: &str = "rad:";
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -106,12 +106,10 @@ impl RepoId {
|
|
|
|
|
|
| - | |
|
|
|
|
| - | |
| + | |
|
|
| - | |
|
|
|
|
|
@@ -315,10 +313,7 @@ pub mod arbitrary {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-fetch/src/git/mem.rs
@@ -42,10 +42,10 @@ impl Refdb {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/test/handle.rs
@@ -118,7 +118,7 @@ impl radicle::node::Handle for Handle {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-oid/src/lib.rs
@@ -74,12 +74,10 @@ extern crate alloc;
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -87,19 +85,25 @@ pub enum Oid {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -130,11 +134,11 @@ impl From<Oid> for alloc::boxed::Box<[u8]> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -147,8 +151,8 @@ pub mod str {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -230,7 +234,7 @@ pub mod str {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -319,7 +323,7 @@ mod fmt {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -367,7 +371,7 @@ mod gix {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -384,7 +388,7 @@ mod gix {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -404,7 +408,7 @@ mod gix {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -451,7 +455,7 @@ mod git2 {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -465,9 +469,7 @@ mod test {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -508,10 +510,11 @@ mod serde {
|
|
|
|
|
|
| - | |
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -568,9 +571,12 @@ mod schemars {
|
|
|
|
|
|
| - | |
| + | |
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-protocol/src/service/message.rs
@@ -690,7 +690,6 @@ mod tests {
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -701,7 +700,7 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -759,7 +758,7 @@ mod tests {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-protocol/src/wire.rs
@@ -7,7 +7,6 @@ pub use message::{AddressType, MessageType};
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -22,7 +21,6 @@ use cypheraddr::tor;
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -45,8 +43,11 @@ pub type Size = u16;
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -382,23 +383,13 @@ where
|
|
|
|
|
|
| - | |
| - | |
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -633,8 +624,8 @@ mod tests {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-protocol/src/worker/fetch/error.rs
@@ -2,7 +2,7 @@ use std::io;
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -10,7 +10,7 @@ pub enum Fetch {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/src/node/notifications/store.rs
@@ -380,7 +380,7 @@ mod parse {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -391,7 +391,7 @@ mod parse {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/src/storage/refs.rs
@@ -177,7 +177,7 @@ impl Refs {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/src/storage/refs/arbitrary.rs
@@ -17,7 +17,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -28,13 +28,12 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
|
|
|
|
|
@@ -49,10 +48,7 @@ impl Arbitrary for Refs {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
|
|
|
|
|
@@ -66,7 +62,7 @@ impl Arbitrary for RefsAt {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/src/test/arbitrary.rs
@@ -25,8 +25,7 @@ use crate::test::storage::{MockRepository, MockStorage};
|
|
|
|
|
|
| - | |
| - | |
| + | |
|
|
|
|
|