From 4498a9b15be22b3501634374e4107f53691b7f75 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Sun, 28 Jun 2020 22:29:11 +0200 Subject: [PATCH] try setting email --- asyncgit/src/sync/commit.rs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/asyncgit/src/sync/commit.rs b/asyncgit/src/sync/commit.rs index c799e39b..1b55ef51 100644 --- a/asyncgit/src/sync/commit.rs +++ b/asyncgit/src/sync/commit.rs @@ -83,12 +83,18 @@ pub fn commit(repo_path: &str, msg: &str) -> Result { #[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();