mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Update dependencies and refactor git integration
- Added new dependencies in `Cargo.lock` and updated `Cargo.toml` to include `gix` for improved git functionality. - Refactored git-related functions to utilize the `gix` library, enhancing performance and reliability in handling git operations. - Simplified the process of initializing git repositories and committing changes within the CLI commands. - Updated tests to reflect changes in git integration and ensure proper functionality. These changes aim to modernize the git handling in the project and improve overall code quality.
This commit is contained in:
parent
d8d6a53fce
commit
0a359ccaf1
12 changed files with 1954 additions and 473 deletions
|
|
@ -203,21 +203,17 @@ impl TestServeSession {
|
|||
.expect("Couldn't copy project to temporary directory");
|
||||
|
||||
// Initialize git repo and run setup callback
|
||||
Command::new("git")
|
||||
.args(["init"])
|
||||
.current_dir(&project_path)
|
||||
.output()
|
||||
.expect("git init failed");
|
||||
Command::new("git")
|
||||
.args(["config", "user.email", "test@test.com"])
|
||||
.current_dir(&project_path)
|
||||
.output()
|
||||
.unwrap();
|
||||
Command::new("git")
|
||||
.args(["config", "user.name", "Test"])
|
||||
.current_dir(&project_path)
|
||||
.output()
|
||||
.unwrap();
|
||||
let mut repo = gix::init(&project_path).expect("gix init failed");
|
||||
{
|
||||
let mut config = repo.config_snapshot_mut();
|
||||
config
|
||||
.set_raw_value(&gix::config::tree::User::NAME, "Test")
|
||||
.unwrap();
|
||||
config
|
||||
.set_raw_value(&gix::config::tree::User::EMAIL, "test@test.com")
|
||||
.unwrap();
|
||||
let _ = config.commit_auto_rollback().unwrap();
|
||||
}
|
||||
|
||||
setup(&project_path);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue