https://bugzilla.wikimedia.org/show_bug.cgi?id=44599
Web browser: ---
Bug ID: 44599
Summary: GitInfo doesn't get SHA1 version of git submodules for
Special:Version
Product: MediaWiki
Version: 1.21-git
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: General/Unknown
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
On my local wiki, Special:Version only shows git SHA1 hashes for extensions
that have local .git subdirectories because I checked out a particular version.
Where I relied on `git submodule update --init`, the extension's .git is a
plain file containing only a gitdir: line, for example extension/Vector/.git
contains only
gitdir: /home/spage/projects/core/.git/modules/extensions/Vector
and it is this directory in a parent repository that contains a HEAD file with
the commit hash.
Looking at GitInfo.php confirms this. It doesn't do anything special when an
extension's .git is a plain file, so fails trying to read "{$dir}/.git/HEAD",
and so doesn't retrieve the SHA1.
Looking at `strace git rev-parse --short HEAD`, I think GitInfo.php should: in
_construct() check if .git is a plain file, if so read it, if it contains
"gitdir: /some/path" then set $this->basedir to that path.
Fixing this may make Special:Version on WMF wikis return to showing the git
SHA1 hashes of extensions.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l