Page MenuHomePhabricator

fatal: Not a git repository: '/home/travis/build/wikimedia/mediawiki-core/testMissingJsonData/.git' on travis
Closed, ResolvedPublic

Description

Since https://gerrit.wikimedia.org/r/#/c/130498 was merged travis outputs a fatal error in the middle of tests

fatal: Not a git repository: '/home/travis/build/wikimedia/mediawiki-core/testMissingJsonData/.git'

Before this was merged:
https://travis-ci.org/wikimedia/mediawiki-core/jobs/24496055#L124

After this was merged:
https://travis-ci.org/wikimedia/mediawiki-core/jobs/24496592#L124


Version: 1.24rc
Severity: minor

Details

Reference
bz64948

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 3:21 AM
bzimport set Reference to bz64948.
bd808 added a comment.May 6 2014, 3:24 PM

This error is raised in GitInfoTest::testMissingJsonData() negative test by GitInfo::getHeadCommitDate(). getHeadCommitDate execs git show ... to find the date of the current HEAD without ever checking that GitInfo::basedir exists and valid. It looks like the rest of the data accessors in GitInfo do an is_readable() check and quietly return false if the git control files aren't available.

Change 131764 had a related patch set uploaded by BryanDavis:
Check for valid git repository in GitInfo::getHeadCommitDate

https://gerrit.wikimedia.org/r/131764

Change 131764 merged by jenkins-bot:
Check for valid git repository in GitInfo::getHeadCommitDate

https://gerrit.wikimedia.org/r/131764