Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Add author to the Git commit command, otherwise it can prevent auto-c…
Browse files Browse the repository at this point in the history
…ommit

(cherry picked from commit 50fa673)
  • Loading branch information
cdujeu committed Oct 17, 2014
1 parent 985883e commit 683f12f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/plugins/meta.git/class.GitManager.php
Expand Up @@ -277,10 +277,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 {
Expand Down

0 comments on commit 683f12f

Please sign in to comment.