Improve GitInfo for reading packed refs
authorSeb35 <seb35@seb35.fr>
Fri, 15 Sep 2017 08:29:13 +0000 (10:29 +0200)
committerBryanDavis <bdavis@wikimedia.org>
Mon, 2 Oct 2017 03:47:33 +0000 (03:47 +0000)
commit125f83234eb17f0c270ca9b3e50b41ec64045c7e
treea0f270291cfbd6fb810cc30ef8fb1d9a60558ee7
parent44c06df91810074414899ae65fb3bbe3cca43fea
Improve GitInfo for reading packed refs

GitInfo only reads branches in files /refs/heads/*; it should also
read those in /.git/packed-refs.

There are 4 tests in this commit to test this new "feature" and add some
code coverage to other methods. Given this class tests Git behaviour and
MediaWiki itself is versioned with Git, the test data are created during
the tests and removed at the end to avoid interference with Git as CVS.

Bug: T155747
Change-Id: Icccdf3ec797788582f836e2d8e267a1d714d50dc
includes/GitInfo.php
tests/phpunit/includes/GitInfoTest.php