Page MenuHomePhabricator

D21723.diff
No OneTemporary

D21723.diff

diff --git a/src/ref/commit/ArcanistMercurialCommitSymbolCommitHardpointQuery.php b/src/ref/commit/ArcanistMercurialCommitSymbolCommitHardpointQuery.php
--- a/src/ref/commit/ArcanistMercurialCommitSymbolCommitHardpointQuery.php
+++ b/src/ref/commit/ArcanistMercurialCommitSymbolCommitHardpointQuery.php
@@ -159,7 +159,7 @@
// a spot which a marker might match.
foreach ($node_list as $node) {
foreach ($symbol_set as $symbol) {
- if (str_starts_with($node, $symbol)) {
+ if (strncmp($node, $symbol, strlen($symbol)) === 0) {
if (!isset($hash_map[$symbol])) {
$hash_map[$symbol] = $node;
}
diff --git a/src/repository/api/ArcanistMercurialAPI.php b/src/repository/api/ArcanistMercurialAPI.php
--- a/src/repository/api/ArcanistMercurialAPI.php
+++ b/src/repository/api/ArcanistMercurialAPI.php
@@ -672,7 +672,10 @@
public function amendCommit($message = null) {
$path_statuses = $this->buildUncommittedStatus();
- if ($message === null) {
+ $existing_message = $this->getCommitMessage(
+ $this->getWorkingCopyRevision());
+
+ if ($message === null || $message == $existing_message) {
if (empty($path_statuses)) {
// If there are no changes to the working directory and the message is
// not being changed then there's nothing to amend. Notably Mercurial

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 2:52 PM (5 d, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7703968
Default Alt Text
D21723.diff (1 KB)

Event Timeline