From 50fa67334ffb9c0970034a3af2cf193dd6d5486b Mon Sep 17 00:00:00 2001 From: cdujeu Date: Wed, 3 Sep 2014 10:07:26 +0200 Subject: [PATCH] Add author to the Git commit command, otherwise it can prevent auto-commit --- core/src/plugins/meta.git/class.GitManager.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/plugins/meta.git/class.GitManager.php b/core/src/plugins/meta.git/class.GitManager.php index 2583133e04..dc808032fd 100644 --- a/core/src/plugins/meta.git/class.GitManager.php +++ b/core/src/plugins/meta.git/class.GitManager.php @@ -284,10 +284,13 @@ private function commitChanges($path = null) $command = $git->getCommand("commit"); $command->setOption("a", true); $userId = "no user"; + $mail = "mail@mail.com"; if (AuthService::getLoggedUser()!=null) { $userId = AuthService::getLoggedUser()->getId(); + $mail = AuthService::getLoggedUser()->personalRole->filterParameterValue("core.conf", "email", AJXP_REPO_SCOPE_ALL, "mail@mail.com"); } $command->setOption("m", $userId); + $command->setOption("author", "$userId <$mail>"); //$command->addArgument($path); try {