Unified · Split
| @@ -1427,16 +1427,13 @@ name = "gix-config-tests" · 1426 unmodified lines | |||
| 1427 | version = "0.0.0" | 1427 | version = "0.0.0" |
| 1428 | dependencies = [ | 1428 | dependencies = [ |
| 1429 | "bstr", | 1429 | "bstr", |
| 1430 | "criterion", | ||
| 1431 | "gix", | 1430 | "gix", |
| 1432 | "gix-config", | 1431 | "gix-config", |
| 1433 | "gix-path 0.8.4", | 1432 | "gix-path 0.8.4", |
| 1434 | "gix-ref 0.34.0", | 1433 | "gix-ref 0.34.0", |
| 1435 | "gix-sec 0.8.4", | 1434 | "gix-sec 0.8.4", |
| 1436 | "gix-testtools", | 1435 | "gix-testtools", |
| 1437 | "serde_derive", | ||
| 1438 | "serial_test", | 1436 | "serial_test", |
| 1439 | "tempfile", | ||
| 1440 | ] | 1437 | ] |
| 1441 | 1438 | ||
| 1442 | [[package]] | 1439 | [[package]] |
| @@ -1946,7 +1943,7 @@ dependencies = [ · 503 unmodified lines | |||
| 1946 | 1943 | ||
| 1947 | [[package]] | 1944 | [[package]] |
| 1948 | name = "gix-pack-tests" | 1945 | name = "gix-pack-tests" |
| 1949 | version = "0.30.1" | 1946 | version = "0.0.0" |
| 1950 | dependencies = [ | 1947 | dependencies = [ |
| 1951 | "bstr", | 1948 | "bstr", |
| 1952 | "gix-features 0.32.1", | 1949 | "gix-features 0.32.1", |
| @@ -1958,7 +1955,6 @@ dependencies = [ · 5 unmodified lines | |||
| 1958 | "gix-traverse 0.31.0", | 1955 | "gix-traverse 0.31.0", |
| 1959 | "maplit", | 1956 | "maplit", |
| 1960 | "memmap2 0.7.1", | 1957 | "memmap2 0.7.1", |
| 1961 | "tempfile", | ||
| 1962 | ] | 1958 | ] |
| 1963 | 1959 | ||
| 1964 | [[package]] | 1960 | [[package]] |
| @@ -2244,7 +2240,7 @@ dependencies = [ · 279 unmodified lines | |||
| 2244 | 2240 | ||
| 2245 | [[package]] | 2241 | [[package]] |
| 2246 | name = "gix-status-tests" | 2242 | name = "gix-status-tests" |
| 2247 | version = "0.1.0" | 2243 | version = "0.0.0" |
| 2248 | dependencies = [ | 2244 | dependencies = [ |
| 2249 | "bstr", | 2245 | "bstr", |
| 2250 | "filetime", | 2246 | "filetime", |
| @@ -2523,7 +2519,7 @@ dependencies = [ · 272 unmodified lines | |||
| 2523 | 2519 | ||
| 2524 | [[package]] | 2520 | [[package]] |
| 2525 | name = "gix-worktree-state-tests" | 2521 | name = "gix-worktree-state-tests" |
| 2526 | version = "0.1.0" | 2522 | version = "0.0.0" |
| 2527 | dependencies = [ | 2523 | dependencies = [ |
| 2528 | "gix-discover 0.23.0", | 2524 | "gix-discover 0.23.0", |
| 2529 | "gix-features 0.32.1", | 2525 | "gix-features 0.32.1", |
| @@ -2561,7 +2557,7 @@ dependencies = [ · 31 unmodified lines | |||
| 2561 | 2557 | ||
| 2562 | [[package]] | 2558 | [[package]] |
| 2563 | name = "gix-worktree-tests" | 2559 | name = "gix-worktree-tests" |
| 2564 | version = "0.1.0" | 2560 | version = "0.0.0" |
| 2565 | dependencies = [ | 2561 | dependencies = [ |
| 2566 | "bstr", | 2562 | "bstr", |
| 2567 | "gix-attributes 0.16.0", | 2563 | "gix-attributes 0.16.0", |
| @@ -2,13 +2,10 @@ · 1 unmodified line | |||
| 2 | name = "gix-config-tests" | 2 | name = "gix-config-tests" |
| 3 | version = "0.0.0" | 3 | version = "0.0.0" |
| 4 | repository = "https://github.com/Byron/gitoxide" | 4 | repository = "https://github.com/Byron/gitoxide" |
| 5 | description = "A git-config file parser and editor from the gitoxide project" | 5 | description = "Tests for the gix-config crate" |
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | authors = ["Edward Shen <code@eddie.sh>"] | 7 | authors = ["Edward Shen <code@eddie.sh>"] |
| 8 | edition = "2021" | 8 | edition = "2021" |
| 9 | keywords = ["git-config", "git", "config", "gitoxide"] | ||
| 10 | categories = ["config", "parser-implementations"] | ||
| 11 | include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"] | ||
| 12 | rust-version = "1.65" | 9 | rust-version = "1.65" |
| 13 | publish = false | 10 | publish = false |
| 14 | 11 | ||
| @@ -17,10 +14,6 @@ publish = false · 2 unmodified lines | |||
| 17 | name = "config" | 14 | name = "config" |
| 18 | path = "config.rs" | 15 | path = "config.rs" |
| 19 | 16 | ||
| 20 | [features] | ||
| 21 | ## Data structures implement `serde::Serialize` and `serde::Deserialize`. | ||
| 22 | serde = ["gix-config/serde"] | ||
| 23 | |||
| 24 | [dev-dependencies] | 17 | [dev-dependencies] |
| 25 | gix-config = { path = ".."} | 18 | gix-config = { path = ".."} |
| 26 | gix-testtools = { path = "../../tests/tools"} | 19 | gix-testtools = { path = "../../tests/tools"} |
| @@ -29,12 +22,4 @@ gix-ref = { path = "../../gix-ref" } · 2 unmodified lines | |||
| 29 | gix-path = { path = "../../gix-path" } | 22 | gix-path = { path = "../../gix-path" } |
| 30 | gix-sec = { path = "../../gix-sec" } | 23 | gix-sec = { path = "../../gix-sec" } |
| 31 | serial_test = { version = "2.0.0", default-features = false } | 24 | serial_test = { version = "2.0.0", default-features = false } |
| 32 | serde_derive = "1.0" | ||
| 33 | criterion = "0.5.1" | ||
| 34 | tempfile = "3.2.0" | ||
| 35 | bstr = { version = "1.3.0", default-features = false, features = ["std"] } | 25 | bstr = { version = "1.3.0", default-features = false, features = ["std"] } |
| 36 | |||
| 37 | [package.metadata.docs.rs] | ||
| 38 | all-features = true | ||
| 39 | features = ["document-features"] | ||
| 40 | rustdoc-args = ["--cfg", "docsrs"] | ||
| @@ -4,9 +4,9 @@ use gix_config::{ · 3 unmodified lines | |||
| 4 | file::{includes, init, init::from_env}, | 4 | file::{includes, init, init::from_env}, |
| 5 | File, | 5 | File, |
| 6 | }; | 6 | }; |
| 7 | use gix_testtools::tempfile::tempdir; | ||
| 7 | use gix_testtools::Env; | 8 | use gix_testtools::Env; |
| 8 | use serial_test::serial; | 9 | use serial_test::serial; |
| 9 | use tempfile::tempdir; | ||
| 10 | 10 | ||
| 11 | use crate::file::init::from_paths::escape_backslashes; | 11 | use crate::file::init::from_paths::escape_backslashes; |
| 12 | 12 | ||
| @@ -19,7 +19,7 @@ use crate::file::{ · 18 unmodified lines | |||
| 19 | 19 | ||
| 20 | #[derive(Debug)] | 20 | #[derive(Debug)] |
| 21 | pub struct GitEnv { | 21 | pub struct GitEnv { |
| 22 | tempdir: tempfile::TempDir, | 22 | tempdir: gix_testtools::tempfile::TempDir, |
| 23 | root_dir: PathBuf, | 23 | root_dir: PathBuf, |
| 24 | git_dir: PathBuf, | 24 | git_dir: PathBuf, |
| 25 | home_dir: PathBuf, | 25 | home_dir: PathBuf, |
| @@ -68,7 +68,7 @@ impl Condition { · 42 unmodified lines | |||
| 68 | 68 | ||
| 69 | impl GitEnv { | 69 | impl GitEnv { |
| 70 | pub fn repo_name(repo_name: impl AsRef<Path>) -> crate::Result<Self> { | 70 | pub fn repo_name(repo_name: impl AsRef<Path>) -> crate::Result<Self> { |
| 71 | let tempdir = tempfile::tempdir()?; | 71 | let tempdir = gix_testtools::tempfile::tempdir()?; |
| 72 | let root_dir = gix_path::realpath(tempdir.path())?; | 72 | let root_dir = gix_path::realpath(tempdir.path())?; |
| 73 | let worktree_dir = root_dir.join(repo_name); | 73 | let worktree_dir = root_dir.join(repo_name); |
| 74 | std::fs::create_dir_all(&worktree_dir)?; | 74 | std::fs::create_dir_all(&worktree_dir)?; |
| @@ -4,7 +4,7 @@ use gix_config::{ · 3 unmodified lines | |||
| 4 | file::{includes, init}, | 4 | file::{includes, init}, |
| 5 | path, File, | 5 | path, File, |
| 6 | }; | 6 | }; |
| 7 | use tempfile::tempdir; | 7 | use gix_testtools::tempfile::tempdir; |
| 8 | 8 | ||
| 9 | use crate::file::{cow_str, init::from_paths::escape_backslashes}; | 9 | use crate::file::{cow_str, init::from_paths::escape_backslashes}; |
| 10 | 10 | ||
| @@ -13,7 +13,7 @@ use gix_ref::{ · 12 unmodified lines | |||
| 13 | transaction::{Change, PreviousValue, RefEdit}, | 13 | transaction::{Change, PreviousValue, RefEdit}, |
| 14 | FullName, Target, | 14 | FullName, Target, |
| 15 | }; | 15 | }; |
| 16 | use tempfile::tempdir; | 16 | use gix_testtools::tempfile::tempdir; |
| 17 | 17 | ||
| 18 | use crate::file::{cow_str, init::from_paths::includes::conditional::git_init}; | 18 | use crate::file::{cow_str, init::from_paths::includes::conditional::git_init}; |
| 19 | 19 | ||
| @@ -181,7 +181,7 @@ enum Value { · 161 unmodified lines | |||
| 181 | #[derive(Debug)] | 181 | #[derive(Debug)] |
| 182 | struct GitEnv { | 182 | struct GitEnv { |
| 183 | repo: gix::Repository, | 183 | repo: gix::Repository, |
| 184 | dir: tempfile::TempDir, | 184 | dir: gix_testtools::tempfile::TempDir, |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | impl GitEnv { | 187 | impl GitEnv { |
| @@ -291,7 +291,10 @@ value = branch-override-by-include · 103 unmodified lines | |||
| 291 | Ok(GitEnv { repo, dir }) | 291 | Ok(GitEnv { repo, dir }) |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | fn assure_git_agrees(expected: Value, dir: tempfile::TempDir) -> crate::Result<tempfile::TempDir> { | 294 | fn assure_git_agrees( |
| 295 | expected: Value, | ||
| 296 | dir: gix_testtools::tempfile::TempDir, | ||
| 297 | ) -> crate::Result<gix_testtools::tempfile::TempDir> { | ||
| 295 | let git_dir = dir.path(); | 298 | let git_dir = dir.path(); |
| 296 | let output = std::process::Command::new("git") | 299 | let output = std::process::Command::new("git") |
| 297 | .args(["config", "--get", "section.value"]) | 300 | .args(["config", "--get", "section.value"]) |
| @@ -4,7 +4,7 @@ use gix_config::{ · 3 unmodified lines | |||
| 4 | file::{includes, init, init::from_paths}, | 4 | file::{includes, init, init::from_paths}, |
| 5 | File, | 5 | File, |
| 6 | }; | 6 | }; |
| 7 | use tempfile::tempdir; | 7 | use gix_testtools::tempfile::tempdir; |
| 8 | 8 | ||
| 9 | use crate::file::{ | 9 | use crate::file::{ |
| 10 | cow_str, | 10 | cow_str, |
| @@ -1,7 +1,7 @@ | |||
| 1 | use std::{fs, path::PathBuf}; | 1 | use std::{fs, path::PathBuf}; |
| 2 | 2 | ||
| 3 | use gix_config::{File, Source}; | 3 | use gix_config::{File, Source}; |
| 4 | use tempfile::tempdir; | 4 | use gix_testtools::tempfile::tempdir; |
| 5 | 5 | ||
| 6 | use crate::file::cow_str; | 6 | use crate::file::cow_str; |
| 7 | 7 | ||
| @@ -13,7 +13,7 @@ pub(crate) fn escape_backslashes(path: impl AsRef<std::path::Path>) -> String { · 5 unmodified lines | |||
| 13 | mod from_path_no_includes { | 13 | mod from_path_no_includes { |
| 14 | #[test] | 14 | #[test] |
| 15 | fn file_not_found() { | 15 | fn file_not_found() { |
| 16 | let dir = tempfile::tempdir().unwrap(); | 16 | let dir = gix_testtools::tempfile::tempdir().unwrap(); |
| 17 | let config_path = dir.path().join("config"); | 17 | let config_path = dir.path().join("config"); |
| 18 | 18 | ||
| 19 | let err = gix_config::File::from_path_no_includes(config_path, gix_config::Source::Local).unwrap_err(); | 19 | let err = gix_config::File::from_path_no_includes(config_path, gix_config::Source::Local).unwrap_err(); |
| @@ -24,7 +24,7 @@ mod from_path_no_includes { · 4 unmodified lines | |||
| 24 | 24 | ||
| 25 | #[test] | 25 | #[test] |
| 26 | fn single_path() { | 26 | fn single_path() { |
| 27 | let dir = tempfile::tempdir().unwrap(); | 27 | let dir = gix_testtools::tempfile::tempdir().unwrap(); |
| 28 | let config_path = dir.path().join("config"); | 28 | let config_path = dir.path().join("config"); |
| 29 | std::fs::write(config_path.as_path(), b"[core]\nboolean = true").unwrap(); | 29 | std::fs::write(config_path.as_path(), b"[core]\nboolean = true").unwrap(); |
| 30 | 30 | ||
| @@ -4,18 +4,14 @@ version = "0.0.0" · 3 unmodified lines | |||
| 4 | publish = false | 4 | publish = false |
| 5 | repository = "https://github.com/Byron/gitoxide" | 5 | repository = "https://github.com/Byron/gitoxide" |
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | description = "Please use `gix-<thiscrate>` instead ('git' -> 'gix')" | 7 | description = "Tests for the gix-diff crate" |
| 8 | authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] | 8 | authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] |
| 9 | edition = "2021" | 9 | edition = "2021" |
| 10 | include = ["src/**/*"] | ||
| 11 | rust-version = "1.65" | 10 | rust-version = "1.65" |
| 12 | 11 | ||
| 13 | [features] | ||
| 14 | serde = ["gix-diff/serde", "gix-hash/serde", "gix-object/serde"] | ||
| 15 | |||
| 16 | [[test]] | 12 | [[test]] |
| 17 | name = "diff" | ||
| 18 | doctest = false | 13 | doctest = false |
| 14 | name = "diff" | ||
| 19 | path = "diff.rs" | 15 | path = "diff.rs" |
| 20 | 16 | ||
| 21 | [dev-dependencies] | 17 | [dev-dependencies] |
| @@ -13,12 +13,9 @@ rust-version = "1.65" · 12 unmodified lines | |||
| 13 | name = "integrate" | 13 | name = "integrate" |
| 14 | path = "integrate.rs" | 14 | path = "integrate.rs" |
| 15 | 15 | ||
| 16 | |||
| 17 | [features] | 16 | [features] |
| 18 | gix-features-parallel = ["gix-features/parallel"] | 17 | gix-features-parallel = ["gix-features/parallel"] |
| 19 | 18 | ||
| 20 | [dependencies] | ||
| 21 | |||
| 22 | [dev-dependencies] | 19 | [dev-dependencies] |
| 23 | gix-index = { path = ".." } | 20 | gix-index = { path = ".." } |
| 24 | gix-features = { path = "../../gix-features", features = ["rustsha1", "progress"] } | 21 | gix-features = { path = "../../gix-features", features = ["rustsha1", "progress"] } |
| @@ -1,12 +1,11 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "gix-pack-tests" | 2 | name = "gix-pack-tests" |
| 3 | version = "0.30.1" | 3 | version = "0.0.0" |
| 4 | repository = "https://github.com/Byron/gitoxide" | 4 | repository = "https://github.com/Byron/gitoxide" |
| 5 | authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] | 5 | authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] |
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | description = "Please use `gix-<thiscrate>` instead ('git' -> 'gix')" | 7 | description = "Please use `gix-<thiscrate>` instead ('git' -> 'gix')" |
| 8 | edition = "2018" | 8 | edition = "2018" |
| 9 | include = ["src/**/*", "CHANGELOG.md"] | ||
| 10 | rust-version = "1.65" | 9 | rust-version = "1.65" |
| 11 | 10 | ||
| 12 | [features] | 11 | [features] |
| @@ -22,7 +21,6 @@ gix-pack = { path = ".." } · 9 unmodified lines | |||
| 22 | gix-features = { path = "../../gix-features" } | 21 | gix-features = { path = "../../gix-features" } |
| 23 | gix-testtools = { path = "../../tests/tools"} | 22 | gix-testtools = { path = "../../tests/tools"} |
| 24 | gix-odb = { path = "../../gix-odb" } | 23 | gix-odb = { path = "../../gix-odb" } |
| 25 | tempfile = "3.1.0" | ||
| 26 | bstr = { version = "1.3.0", default-features = false, features = ["std"] } | 24 | bstr = { version = "1.3.0", default-features = false, features = ["std"] } |
| 27 | maplit = "1.0.2" | 25 | maplit = "1.0.2" |
| 28 | gix-object = { path = "../../gix-object" } | 26 | gix-object = { path = "../../gix-object" } |
| @@ -80,7 +80,7 @@ mod write_to_directory { · 79 unmodified lines | |||
| 80 | 80 | ||
| 81 | use gix_features::progress; | 81 | use gix_features::progress; |
| 82 | use gix_odb::pack; | 82 | use gix_odb::pack; |
| 83 | use tempfile::TempDir; | 83 | use gix_testtools::tempfile::TempDir; |
| 84 | 84 | ||
| 85 | use crate::{ | 85 | use crate::{ |
| 86 | fixture_path, | 86 | fixture_path, |
| @@ -339,7 +339,7 @@ fn write_and_verify( · 338 unmodified lines | |||
| 339 | _expected_pack_hash: gix_hash::ObjectId, | 339 | _expected_pack_hash: gix_hash::ObjectId, |
| 340 | _expected_thin_pack_hash: Option<gix_hash::ObjectId>, | 340 | _expected_thin_pack_hash: Option<gix_hash::ObjectId>, |
| 341 | ) -> crate::Result { | 341 | ) -> crate::Result { |
| 342 | let tmp_dir = tempfile::TempDir::new()?; | 342 | let tmp_dir = gix_testtools::tempfile::TempDir::new()?; |
| 343 | let pack_file_path = tmp_dir.path().join("new.pack"); | 343 | let pack_file_path = tmp_dir.path().join("new.pack"); |
| 344 | let mut pack_file = std::fs::OpenOptions::new() | 344 | let mut pack_file = std::fs::OpenOptions::new() |
| 345 | .write(true) | 345 | .write(true) |
| @@ -7,7 +7,7 @@ use crate::hex_to_id; · 6 unmodified lines | |||
| 7 | 7 | ||
| 8 | #[test] | 8 | #[test] |
| 9 | fn from_paths() -> crate::Result { | 9 | fn from_paths() -> crate::Result { |
| 10 | let dir = tempfile::TempDir::new()?; | 10 | let dir = gix_testtools::tempfile::TempDir::new()?; |
| 11 | let input_indices = std::fs::read_dir(fixture_path_standalone("objects/pack"))? | 11 | let input_indices = std::fs::read_dir(fixture_path_standalone("objects/pack"))? |
| 12 | .filter_map(|r| { | 12 | .filter_map(|r| { |
| 13 | r.ok() | 13 | r.ok() |
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "gix-status-tests" | 2 | name = "gix-status-tests" |
| 3 | version = "0.1.0" | 3 | version = "0.0.0" |
| 4 | repository = "https://github.com/Byron/gitoxide" | 4 | repository = "https://github.com/Byron/gitoxide" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | description = "A crate to drive gix-status tests with different features" | 6 | description = "A crate to drive gix-status tests with different features" |
| @@ -3,10 +3,9 @@ name = "gix-traverse-tests" · 2 unmodified lines | |||
| 3 | version = "0.0.0" | 3 | version = "0.0.0" |
| 4 | repository = "https://github.com/Byron/gitoxide" | 4 | repository = "https://github.com/Byron/gitoxide" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | description = "Please use `gix-<thiscrate>` instead ('git' -> 'gix')" | 6 | description = "Integration tests for the gix-traverse crate" |
| 7 | authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] | 7 | authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] |
| 8 | edition = "2021" | 8 | edition = "2021" |
| 9 | include = ["src/**/*"] | ||
| 10 | rust-version = "1.65" | 9 | rust-version = "1.65" |
| 11 | 10 | ||
| 12 | [[test]] | 11 | [[test]] |
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "gix-worktree-state-tests" | 2 | name = "gix-worktree-state-tests" |
| 3 | version = "0.1.0" | 3 | version = "0.0.0" |
| 4 | repository = "https://github.com/Byron/gitoxide" | 4 | repository = "https://github.com/Byron/gitoxide" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | description = "A crate for running tests with feature toggles on gix-worktree-state" | 6 | description = "A crate for running tests with feature toggles on gix-worktree-state" |
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "gix-worktree-tests" | 2 | name = "gix-worktree-tests" |
| 3 | version = "0.1.0" | 3 | version = "0.0.0" |
| 4 | repository = "https://github.com/Byron/gitoxide" | 4 | repository = "https://github.com/Byron/gitoxide" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | description = "A crate for testing the gix-worktree crate with feature toggles" | 6 | description = "A crate for testing the gix-worktree crate with feature toggles" |