Page MenuHomePhabricator

D7490.diff
No OneTemporary

D7490.diff

Index: src/applications/diffusion/controller/DiffusionController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionController.php
+++ src/applications/diffusion/controller/DiffusionController.php
@@ -180,7 +180,7 @@
switch ($repository->getVersionControlSystem()) {
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
- $result = $this->serveGitRequest($repository);
+ $result = $this->serveGitRequest($repository, $viewer);
break;
default:
$result = new PhabricatorVCSResponse(
@@ -192,9 +192,11 @@
$code = $result->getHTTPResponseCode();
if ($is_push && ($code == 200)) {
- $repository->writeStatusMessage(
- PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE,
- PhabricatorRepositoryStatusMessage::CODE_OKAY);
+ $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
+ $repository->writeStatusMessage(
+ PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE,
+ PhabricatorRepositoryStatusMessage::CODE_OKAY);
+ unset($unguarded);
}
return $result;
@@ -454,7 +456,9 @@
/**
* @phutil-external-symbol class PhabricatorStartup
*/
- private function serveGitRequest(PhabricatorRepository $repository) {
+ private function serveGitRequest(
+ PhabricatorRepository $repository,
+ PhabricatorUser $viewer) {
$request = $this->getRequest();
$request_path = $this->getRequestDirectoryPath();
@@ -492,8 +496,9 @@
'GIT_HTTP_EXPORT_ALL' => '1',
'PATH_INFO' => $request_path,
+ 'REMOTE_USER' => $viewer->getUsername(),
+
// TODO: Set these correctly.
- 'REMOTE_USER' => '',
// GIT_COMMITTER_NAME
// GIT_COMMITTER_EMAIL
);

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 6, 11:12 AM (2 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6748883
Default Alt Text
D7490.diff (1 KB)

Event Timeline