Dzahn has submitted this change and it was merged.

Change subject: phab/ex gitblit: Strip out branch HEAD in git.wikimedia.org 
tree link
......................................................................


phab/ex gitblit: Strip out branch HEAD in git.wikimedia.org tree link

regex is by @Danny_B

Bug: T141965
Change-Id: I7f79a86bfd2d5b1f3168cc685b3aac3589fd1755
---
M modules/phabricator/templates/gitblit_vhost.conf.erb
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Chad: Looks good to me, but someone else must approve
  Dzahn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/phabricator/templates/gitblit_vhost.conf.erb 
b/modules/phabricator/templates/gitblit_vhost.conf.erb
index c317a1f..804499c 100644
--- a/modules/phabricator/templates/gitblit_vhost.conf.erb
+++ b/modules/phabricator/templates/gitblit_vhost.conf.erb
@@ -40,8 +40,8 @@
   RewriteCond %{QUERY_STRING} ^(.*&)?r=([0-9A-Za-z/_\.-]+).git(&.*)?$
   RewriteRule 
^/(blame|blob|commit|commitdiff|docs|history|log|patch|summary|tree)/$ 
/$1/%2.git [NE]
 
-  # remove "refs%2Fheads%2F" and "refs%2Fremotes%2Forigin%2F"
-  RewriteRule ^(.*)refs\%2[Ff](heads|remotes\%2[Ff]origin)\%2[Ff](.*)$ $1$3
+  # remove "HEAD/" and "refs%2Fheads%2F" and "refs%2Fremotes%2Forigin%2F"
+  RewriteRule ^(.*)(HEAD/|refs\%2[Ff](heads|remotes\%2[Ff]origin)\%2[Ff])(.*)$ 
$1$4
 
   # <repo%2Fname> -> <repo/name>
   RewriteRule 
^/(blame|blob|commit|commitdiff|docs|history|log|patch|summary|tree)/([0-9A-Za-z/_\.-]+)\%2[Ff](.*)\.git(.*)$
 /$1/$2/$3.git$4 [N]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f79a86bfd2d5b1f3168cc685b3aac3589fd1755
Gerrit-PatchSet: 9
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: 20after4 <mmod...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Danny B. <dann...@email.cz>
Gerrit-Reviewer: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to