From 52d14ef8e6ee6ba48a1d65509e6c107384e5dcec Mon Sep 17 00:00:00 2001 From: Chris Piro Date: Mon, 19 Dec 2011 16:12:13 -0800 Subject: [PATCH] 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 --- src/repository/api/git/ArcanistGitAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository/api/git/ArcanistGitAPI.php b/src/repository/api/git/ArcanistGitAPI.php index fd20e2e8..fd50d2eb 100644 --- a/src/repository/api/git/ArcanistGitAPI.php +++ b/src/repository/api/git/ArcanistGitAPI.php @@ -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); }