Skip to content

convert git2 to gix #23

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

Closed
wants to merge 1 commit into from
Closed
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
1,169 changes: 1,078 additions & 91 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ gitql-ast = { path = "./crates/gitql-ast", version = "0.2.0" }
gitql-parser = { path = "./crates/gitql-parser", version = "0.3.0" }
gitql-engine = { path = "./crates/gitql-engine", version = "0.4.0" }
gitql-cli = { path = "./crates/gitql-cli", version = "0.4.0" }
git2 = { version = "0.17.1", default-features = false }
gix = { version = "0.53.0", default-features = false, features = ["max-performance"] }
2 changes: 1 addition & 1 deletion crates/gitql-ast/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pub mod aggregation;
pub mod date_utils;
pub mod expression;
pub mod function;
pub mod object;
pub mod scope;
pub mod statement;
pub mod types;
pub mod value;
pub mod date_utils;
2 changes: 1 addition & 1 deletion crates/gitql-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ license = "MIT"

[dependencies]
gitql-ast = { path = "../gitql-ast", version = "0.2.0" }
git2 = { version = "0.17.1", default-features = false }
gix = { version = "0.53.0", default-features = false, features = ["blob-diff"] }
regex = "1.8.4"
5 changes: 1 addition & 4 deletions crates/gitql-engine/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ pub struct EvaluationValues {
pub hidden_selections: Vec<std::string::String>,
}

pub fn evaluate(
repos: &Vec<git2::Repository>,
query: GQLQuery,
) -> Result<EvaluationValues, String> {
pub fn evaluate(repos: &Vec<gix::Repository>, query: GQLQuery) -> Result<EvaluationValues, String> {
let mut groups: Vec<Vec<GQLObject>> = Vec::new();
let mut alias_table: HashMap<String, String> = HashMap::new();

Expand Down
4 changes: 2 additions & 2 deletions crates/gitql-engine/src/engine_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::engine_function::select_gql_objects;

pub fn execute_statement(
statement: &Box<dyn Statement>,
repo: &git2::Repository,
repo: &gix::Repository,
groups: &mut Vec<Vec<GQLObject>>,
alias_table: &mut HashMap<String, String>,
hidden_selection: &Vec<String>,
Expand Down Expand Up @@ -88,7 +88,7 @@ pub fn execute_statement(

fn execute_select_statement(
statement: &SelectStatement,
repo: &git2::Repository,
repo: &gix::Repository,
groups: &mut Vec<Vec<GQLObject>>,
hidden_selections: &Vec<String>,
) -> Result<(), String> {
Expand Down
Loading