try setting email

This commit is contained in:
Stephan Dilly 2020-06-28 22:29:11 +02:00
parent 018e87c20a
commit 4498a9b15b

View file

@ -83,12 +83,18 @@ pub fn commit(repo_path: &str, msg: &str) -> Result<CommitId> {
#[cfg(test)]
mod tests {
use crate::error::Result;
use crate::sync::{
commit, get_commit_details, get_commit_files, stage_add_file,
tests::{get_statuses, repo_init, repo_init_empty},
utils::get_head,
LogWalker,
use crate::{
error::Result,
sync::{
commit, get_commit_details, get_commit_files,
stage_add_file,
tests::{
debug_cmd_print, get_statuses, repo_init,
repo_init_empty,
},
utils::get_head,
LogWalker,
},
};
use commit::amend;
use git2::Repository;
@ -202,6 +208,11 @@ mod tests {
stage_add_file(repo_path, file_path).unwrap();
debug_cmd_print(
repo_path,
"git config user.email 'foo@bar.com'",
);
let id = commit(repo_path, "commit msg").unwrap();
let details = get_commit_details(repo_path, id).unwrap();