Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(git): Clean up shallow fetch tests #15002

Merged
merged 11 commits into from
Jan 2, 2025
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Jan 2, 2025

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

@rustbot
Copy link
Collaborator

rustbot commented Jan 2, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testing-cargo-itself Area: cargo's tests S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 2, 2025
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -9,11 +9,29 @@ enum Backend {
Gitoxide,
}

impl Backend {
fn to_arg(&self) -> &'static str {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this method name seems too general? We may have features like checkout or status some day.

@weihanglo weihanglo added this pull request to the merge queue Jan 2, 2025
Merged via the queue into rust-lang:master with commit fbca21b Jan 2, 2025
21 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 4, 2025
Update cargo

9 commits in d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7..fd784878cfa843e3e29a6654ecf564c62fae6735
2024-12-31 20:51:21 +0000 to 2025-01-03 20:06:26 +0000
- chore: bump gix-lock to remove thiserror@1 from `cargo` (rust-lang/cargo#15012)
- refactor(manifest): Clean up field -> env var handling (rust-lang/cargo#15008)
- chore(deps): update rust crate thiserror to v2 (rust-lang/cargo#14998)
- test(git): Clean up shallow fetch tests (rust-lang/cargo#15002)
- fix(schema): Correct and update the JSON Schema (rust-lang/cargo#15000)
- chore(deps): update rust crate itertools to 0.14.0 (rust-lang/cargo#14996)
- fix: env table config can't trigger rebuild with `rerun-if-env-changed`. (rust-lang/cargo#14756)
- chore(deps): update alpine docker tag to v3.21 (rust-lang/cargo#14995)
- fix(package): check dirtiness of symlinks source files (rust-lang/cargo#14981)
@rustbot rustbot added this to the 1.86.0 milestone Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants