Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F77572
D7445.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7445.diff
View Options
diff --git a/src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php b/src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php
--- a/src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php
+++ b/src/applications/diffusion/query/stablecommitname/DiffusionGitStableCommitNameQuery.php
@@ -6,9 +6,17 @@
protected function executeQuery() {
$repository = $this->getRepository();
$branch = $this->getBranch();
- list($stdout) = $repository->execxLocalCommand(
- 'rev-parse --verify %s',
- $branch);
+
+ if ($repository->isWorkingCopyBare()) {
+ list($stdout) = $repository->execxLocalCommand(
+ 'rev-parse --verify %s',
+ $branch);
+ } else {
+ list($stdout) = $repository->execxLocalCommand(
+ 'rev-parse --verify %s/%s',
+ DiffusionBranchInformation::DEFAULT_GIT_REMOTE,
+ $branch);
+ }
$commit = trim($stdout);
return substr($commit, 0, 16);
diff --git a/src/applications/diffusion/request/DiffusionGitRequest.php b/src/applications/diffusion/request/DiffusionGitRequest.php
--- a/src/applications/diffusion/request/DiffusionGitRequest.php
+++ b/src/applications/diffusion/request/DiffusionGitRequest.php
@@ -31,7 +31,13 @@
if ($this->commit) {
return $this->commit;
}
- return $this->getBranch();
+
+ if ($this->repository->isWorkingCopyBare()) {
+ return $this->getBranch();
+ } else {
+ $remote = DiffusionBranchInformation::DEFAULT_GIT_REMOTE;
+ return $remote.'/'.$this->getBranch();
+ }
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ll/za/mehf4mwyxnh2jfpd
Default Alt Text
D7445.diff (1 KB)
Attached To
Mode
D7445: Conditionally restore some "remote/" stuff removed by rP59922b7
Attached
Detach File
Event Timeline
Log In to Comment