Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/260023

Change subject: Redirect HEAD to correct default branch
......................................................................

Redirect HEAD to correct default branch

For example the link would be

https://phabricator.wikimedia.org/diffusion/MCSN/browse/

instead of

https://phabricator.wikimedia.org/diffusion/MCSN/browse/HEAD/

Change-Id: I8ccd94690be9e678a16a1c587e8f4fce1d696a88
---
M GerritProjectController.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions 
refs/changes/23/260023/1

diff --git a/GerritProjectController.php b/GerritProjectController.php
index 8b87873..5e0efd8 100644
--- a/GerritProjectController.php
+++ b/GerritProjectController.php
@@ -1323,6 +1323,7 @@
             $branch = $data['branch'];
             $branch = str_replace('refs/heads','', $branch);
             $branch = trim($branch, '/');
+            $branch = str_replace('HEAD','');
             $branch = urlencode($branch);
 
             return id(new AphrontRedirectResponse())

-- 
To view, visit https://gerrit.wikimedia.org/r/260023
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ccd94690be9e678a16a1c587e8f4fce1d696a88
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/extensions
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to