Summary: See D14232. That didn't actually work. It looks like this does.
Test Plan:
- Ran `git commit --author ...` on build server and saw the same failure.
- Ran `git -c ... -c ... commit ...` on build server and saw it work.
Reviewers: chad
Reviewed By: chad
Differential Revision: https://secure.phabricator.com/D14233
throw $ex;
}
- $author = 'unit-test <unit-test@phabricator.com>';
-
- execx('git commit --author %s -m %s', $author, $subject);
+ // If these aren't configured, Git complains even if we pass --author.
+ $git_name = 'unit-test';
+ $git_email = 'unit-test@phabricator.com';
+
+ execx(
+ 'git -c user.name=%s -c user.email=%s commit -m %s',
+ $git_name,
+ $git_email,
+ $subject);
list($result_hash) = execx('git log -n1 --format=%s', '%T');
$result_hash = trim($result_hash);