Page MenuHomePhabricator

D18654.diff
No OneTemporary

D18654.diff

diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php
--- a/src/repository/api/ArcanistGitAPI.php
+++ b/src/repository/api/ArcanistGitAPI.php
@@ -1054,7 +1054,12 @@
}
public function getBaseCommitRef() {
- $base_commit = $this->getSourceControlBaseRevision();
+ $base_commit = $this->getBaseCommit();
+
+ if ($base_commit === self::GIT_MAGIC_ROOT_COMMIT) {
+ return null;
+ }
+
$base_message = $this->getCommitMessage($base_commit);
// TODO: We should also pull the tree hash.
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
@@ -596,6 +596,20 @@
return $refs;
}
+ public function getBaseCommitRef() {
+ $base_commit = $this->getBaseCommit();
+
+ if ($base_commit === 'null') {
+ return null;
+ }
+
+ $base_message = $this->getCommitMessage($base_commit);
+
+ return $this->newCommitRef()
+ ->setCommitHash($base_commit)
+ ->attachMessage($base_message);
+ }
+
public function hasLocalCommit($commit) {
try {
$this->getCanonicalRevisionName($commit);

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 27, 11:13 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721150
Default Alt Text
D18654.diff (1 KB)

Event Timeline