Test Plan: Run arc diff locally, verify via git log that the commit is amended afterwards (using the mutable history paradigm)
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Koolvin
Differential Revision: https://secure.phabricator.com/D2369
}
public function amendGitHeadCommit($message) {
+ $tmp_file = new TempFile();
+ Filesystem::writeFile($tmp_file, $message);
$this->execxLocal(
- 'commit --amend --allow-empty --message %s',
- $message);
+ 'commit --amend --allow-empty -F %s',
+ $tmp_file);
}
public function getPreReceiveHookStatus($old_ref, $new_ref) {
phutil_require_module('arcanist', 'repository/api/base');
phutil_require_module('phutil', 'console');
+phutil_require_module('phutil', 'filesystem');
+phutil_require_module('phutil', 'filesystem/tempfile');
phutil_require_module('phutil', 'future');
phutil_require_module('phutil', 'future/exec');
phutil_require_module('phutil', 'utils');