1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Don't amend existing revision with arc diff --create

Summary: If there's other revision in last commit message and I said `--create` then it is clear that I want to create a new commit.

Test Plan:
  $ arc diff --create # in dirty working copy on top of my open revision

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5078
This commit is contained in:
vrana 2013-02-22 09:52:00 -08:00
parent aadaf9a795
commit 5d47682f3b

View file

@ -871,10 +871,11 @@ abstract class ArcanistBaseWorkflow extends Phobject {
if (!$commits) {
return false;
}
$commit = reset($commits);
$commit = reset($commits);
$message = ArcanistDifferentialCommitMessage::newFromRawCorpus(
$commit['message']);
if ($message->getGitSVNBaseRevision()) {
return false;
}
@ -883,6 +884,10 @@ abstract class ArcanistBaseWorkflow extends Phobject {
return false;
}
if ($message->getRevisionID() && $this->getArgument('create')) {
return false;
}
// TODO: Check commits since tracking branch. If empty then return false.
$repository = $this->loadProjectRepository();