Last modified: 2013-02-20 16:33:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46599, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44599 - GitInfo doesn't get SHA1 version of git submodules for Special:Version
GitInfo doesn't get SHA1 version of git submodules for Special:Version
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Kevin Israel (PleaseStand)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-02 09:31 UTC by spage
Modified: 2013-02-20 16:33 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description spage 2013-02-02 09:31:46 UTC
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.
Comment 1 Kevin Israel (PleaseStand) 2013-02-03 00:41:28 UTC
Gerrit change #47309
Comment 2 Kevin Israel (PleaseStand) 2013-02-20 16:33:55 UTC
Change merged.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links