1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-09 16:32:39 +01:00

Pass author config to git with "-c x=y" instead of "--author"

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
This commit is contained in:
epriestley 2015-10-04 08:49:20 -07:00
parent 6966be3e7e
commit 172c930630

View file

@ -137,9 +137,15 @@ final class ArcanistBundleTestCase extends PhutilTestCase {
throw $ex;
}
$author = 'unit-test <unit-test@phabricator.com>';
// If these aren't configured, Git complains even if we pass --author.
$git_name = 'unit-test';
$git_email = 'unit-test@phabricator.com';
execx('git commit --author %s -m %s', $author, $subject);
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);