Skip to content

Commit 31243e9

Browse files
Merge pull request #10649 from gitbutlerapp/use-git-helper
Use git helper in tests
2 parents 549ad74 + a15445d commit 31243e9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/but-worktrees/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ gitbutler-branch-actions.workspace = true
2929
gitbutler-testsupport.workspace = true
3030
gitbutler-oxidize.workspace = true
3131
insta.workspace = true
32+
but-testsupport.workspace = true

crates/but-worktrees/tests/worktree/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ mod worktree_new {
206206
mod worktree_list {
207207
use super::*;
208208
use but_graph::VirtualBranchesTomlMetadata;
209+
use but_testsupport::git;
209210
use but_workspace::{StacksFilter, stacks_v3};
210211
use but_worktrees::{WorktreeHealthStatus, list::worktree_list, new::worktree_new};
211212
use gitbutler_branch_actions::BranchManagerExt as _;
@@ -250,15 +251,14 @@ mod worktree_list {
250251
PreviousValue::Any,
251252
"New reference :D",
252253
)?;
253-
std::process::Command::from(gix::command::prepare(gix::path::env::exe_invocation()))
254+
git(&repo)
254255
.current_dir(&c.created.path)
255256
.arg("switch")
256257
.arg("new-ref")
257258
.output()?;
258259

259260
// delete d's worktree
260-
std::process::Command::from(gix::command::prepare(gix::path::env::exe_invocation()))
261-
.current_dir(&ctx.project().path)
261+
git(&repo)
262262
.arg("worktree")
263263
.arg("remove")
264264
.arg("-f")

0 commit comments

Comments
 (0)