Skip to content

Commit

Permalink
test(git): Clean up shallow fetch tests (#15002)
Browse files Browse the repository at this point in the history
### What does this PR try to resolve?

When looking to add shallow fetch for the git CLI, I found it hard to
tell what we test. This tries to clean up the tests and make it easier
to add new ones. My hope is to later generalize the test bodies so we
can more easily test any git backend in any combination of shallow or
deep fetches.

This is part of #13285.

### How should we test and review this PR?

### Additional information
  • Loading branch information
weihanglo authored Jan 2, 2025
2 parents 0200aa0 + 2438807 commit fbca21b
Show file tree
Hide file tree
Showing 2 changed files with 207 additions and 215 deletions.
6 changes: 6 additions & 0 deletions crates/cargo-test-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,12 @@ impl ArgLineCommandExt for &mut ProcessBuilder {
}
}

impl ArgLineCommandExt for &mut Execs {
fn arg<S: AsRef<std::ffi::OsStr>>(self, s: S) -> Self {
self.arg(s)
}
}

impl ArgLineCommandExt for snapbox::cmd::Command {
fn arg<S: AsRef<std::ffi::OsStr>>(self, s: S) -> Self {
self.arg(s)
Expand Down
Loading

0 comments on commit fbca21b

Please sign in to comment.