1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 08:42:40 +01:00

Use --allow-empty when git amending to HEAD

Summary: ... in case the head commit is empty. Empty commits are useful for
injecting an Arcanist commit message in a branch then sending the whole thing
off for review. As far as I know there is no situation in which an empty commit
would exist unintentionally and using ##--allow-empty## would suppress an error.

Test Plan: works fine for a branch I just sent for review

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 1241
This commit is contained in:
Chris Piro 2011-12-19 16:12:13 -08:00
parent 72ee0ced4f
commit 52d14ef8e6

View file

@ -321,7 +321,7 @@ class ArcanistGitAPI extends ArcanistRepositoryAPI {
public function amendGitHeadCommit($message) {
execx(
'(cd %s; git commit --amend --message %s)',
'(cd %s; git commit --amend --allow-empty --message %s)',
$this->getPath(),
$message);
}