From 08165793fcaafe6d1a93a4b43b4e8dbf2bd92437 Mon Sep 17 00:00:00 2001 From: grunny Date: Fri, 6 Apr 2012 23:56:26 +1000 Subject: [PATCH] (bug 35751) Fix git revision links on Special:Version When .git isn't used in the clone URL, links currently break Change-Id: Ia69e1bfea91ef50c126896b374a083447db4481f --- includes/GitInfo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/GitInfo.php b/includes/GitInfo.php index 82c01f7b10..595043a194 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -148,6 +148,9 @@ class GitInfo { } $url = $remote['url']; + if ( substr( $url, -4 ) !== '.git' ) { + $url .= '.git'; + } foreach( $this->viewers as $repo => $viewer ) { $m = array(); $pattern = '#^' . $repo . '$#'; -- 2.20.1