Skip to content

Commit ee2a7df

Browse files
committed
build: delete git-branchless-testing crate
The `git-branchless-lib` crate has a dev-dependency on `git-branchless-testing`, and `git-branchless-testing` has a dependency on `git-branchless-lib`, inducing a circular dependency that means they can't be published to crates.io. This commit collapses them into the same crate again to resolve this circular dependency.
1 parent 9ebe918 commit ee2a7df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+54
-111
lines changed

Cargo.lock

Lines changed: 2 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ members = [
2020
"git-branchless-smartlog",
2121
"git-branchless-submit",
2222
"git-branchless-test",
23-
"git-branchless-testing",
2423
"git-branchless-undo",
2524
"git-branchless",
2625
"git-record",
@@ -105,6 +104,5 @@ vt100 = "0.15.2"
105104
assert_cmd = "2.0.7"
106105
cc = "1.0.83"
107106
criterion = { version = "0.5.1", features = ["html_reports"] }
108-
git-branchless-testing = { version = "0.8.0", path = "git-branchless-testing" }
109107
insta = "1.31.0"
110108
maplit = "1.0.2"

git-branchless-hook/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ regex = { workspace = true }
2020
tracing = { workspace = true }
2121

2222
[dev-dependencies]
23-
git-branchless-testing = { workspace = true }
2423
insta = { workspace = true }

git-branchless-hook/tests/test_hook.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use git_branchless_testing::{make_git, GitRunOptions};
1+
use lib::testing::{make_git, GitRunOptions};
22

33
#[test]
44
fn test_is_rebase_underway() -> eyre::Result<()> {

git-branchless-lib/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ indicatif = { workspace = true }
6060
itertools = { workspace = true }
6161
lazy_static = { workspace = true }
6262
once_cell = { workspace = true }
63+
portable-pty = { workspace = true }
6364
rayon = { workspace = true }
6465
regex = { workspace = true }
6566
rusqlite = { workspace = true }
@@ -73,9 +74,9 @@ tracing = { workspace = true }
7374
tracing-chrome = { workspace = true }
7475
tracing-error = { workspace = true }
7576
tracing-subscriber = { workspace = true }
77+
vt100 = { workspace = true }
7678

7779
[dev-dependencies]
7880
cc = { workspace = true }
7981
criterion = { workspace = true }
80-
git-branchless-testing = { workspace = true }
8182
insta = { workspace = true }

git-branchless-lib/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111

1212
pub mod core;
1313
pub mod git;
14+
pub mod testing;
1415
pub mod util;
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ use std::ops::Deref;
1111
use std::path::{Path, PathBuf};
1212
use std::process::{Command, Stdio};
1313

14+
use crate::core::config::env_vars::{
15+
get_git_exec_path, get_path_to_git, should_use_separate_command_binary, TEST_GIT,
16+
TEST_SEPARATE_COMMAND_BINARIES,
17+
};
18+
use crate::git::{GitRunInfo, GitVersion, NonZeroOid, Repo};
19+
use crate::util::get_sh;
1420
use color_eyre::Help;
1521
use eyre::Context;
1622
use itertools::Itertools;
1723
use lazy_static::lazy_static;
18-
use lib::core::config::env_vars::{
19-
get_git_exec_path, get_path_to_git, should_use_separate_command_binary, TEST_GIT,
20-
TEST_SEPARATE_COMMAND_BINARIES,
21-
};
22-
use lib::git::{GitRunInfo, GitVersion, NonZeroOid, Repo};
23-
use lib::util::get_sh;
2424
use once_cell::sync::OnceCell;
2525
use regex::{Captures, Regex};
2626
use tempfile::TempDir;

git-branchless-lib/tests/test_eventlog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use branchless::core::eventlog::{
55
testing::new_event_replayer, Event, EventLogDb, EventTransactionId,
66
};
77
use branchless::git::{MaybeZeroOid, NonZeroOid, ReferenceName};
8-
use git_branchless_testing::make_git;
8+
use branchless::testing::make_git;
99

1010
#[test]
1111
fn test_drop_non_meaningful_events() -> eyre::Result<()> {

git-branchless-lib/tests/test_git_run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use branchless::git::{GitRunInfo, GitRunOpts};
2-
use git_branchless_testing::make_git;
2+
use branchless::testing::make_git;
33

44
#[test]
55
fn test_hook_working_dir() -> eyre::Result<()> {

git-branchless-lib/tests/test_git_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::{
55
};
66

77
use branchless::git::{dehydrate_tree, get_changed_paths_between_trees, hydrate_tree, FileMode};
8-
use git_branchless_testing::make_git;
8+
use branchless::testing::make_git;
99

1010
#[test]
1111
fn test_hydrate_tree() -> eyre::Result<()> {

0 commit comments

Comments
 (0)