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

[Merged by Bors] - Remove git2 and hex dependencies #1992

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
157 changes: 0 additions & 157 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions boa_tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ regex = "1.5.5"
once_cell = "1.10.0"
colored = "2.0.0"
fxhash = "0.2.1"
git2 = "0.14.2"
hex = "0.4.3"
num-format = "0.4.0"
gc = { version = "0.4.1", features = ["derive"] }
rayon = "1.5.1"
Expand Down
21 changes: 5 additions & 16 deletions boa_tester/src/results.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use super::SuiteResult;
use git2::Repository;
use hex::ToHex;
use serde::{Deserialize, Serialize};
use std::{
env, fs,
Expand Down Expand Up @@ -175,20 +173,11 @@ pub(crate) fn write_json(

/// Gets the commit OID of the test262 submodule.
fn get_test262_commit() -> Box<str> {
let repo = Repository::open(".").expect("could not open git repository in current directory");

let submodule = repo
.submodules()
.expect("could not get the list of submodules of the repo")
.into_iter()
.find(|sub| sub.path() == Path::new("test262"))
.expect("test262 submodule not found");

submodule
.index_id()
.expect("could not get the commit OID")
.encode_hex::<String>()
.into_boxed_str()
let mut commit_id = fs::read_to_string(".git/modules/test262/HEAD")
.expect("did not find git submodule ref at '.git/modules/test262/HEAD'");
// Remove newline.
commit_id.pop();
commit_id.into_boxed_str()
}

/// Updates the GitHub pages repository by pulling latest changes before writing the new things.
Expand Down