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

feat!: Remove git2 cloning strategy #85

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ghr.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ owner = "siketyan"

[git]
# Chooses the strategy to use on Git clones.
# 'Cli' is the default. 'Git2' is also supported, but deprecated.
# 'Cli' is the default and only supported.
strategy.clone = "Cli"

[[patterns]]
Expand Down
26 changes: 0 additions & 26 deletions src/git/strategy/git2.rs

This file was deleted.

5 changes: 1 addition & 4 deletions src/git/strategy/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
mod cli;
mod git2;

pub use {self::git2::Git2, cli::Cli};
pub use cli::Cli;

use std::path::Path;

Expand All @@ -13,7 +12,6 @@ use crate::git::{CloneOptions, CloneRepository};
pub enum Strategy {
#[default]
Cli,
Git2,
}

impl CloneRepository for Strategy {
Expand All @@ -24,7 +22,6 @@ impl CloneRepository for Strategy {
{
match self {
Self::Cli => Cli.clone_repository(url, path, options),
Self::Git2 => Git2.clone_repository(url, path, options),
}
}
}