Closed splitbrain closed 10 years ago
Thanks for the error report. A few requests/thoughts:
Let's start with the unit tests:
PHPUnit 3.6.11 by Sebastian Bergmann.
Configuration read from /bulk/temp/2014-01-17/git-scan/phpunit.xml.dist
......EEEEEE.......FF............................
Time: 1 second, Memory: 7.75Mb
There were 6 errors:
1) GitScan\GitRepoTest::testLocalOnly_Empty
RuntimeException: Failed to determine tracking branch
/bulk/temp/2014-01-17/git-scan/src/GitScan/GitRepo.php:130
/bulk/temp/2014-01-17/git-scan/tests/GitScan/GitRepoTest.php:11
2) GitScan\GitRepoTest::testLocalOnly_AllCommitted
RuntimeException: Failed to determine tracking branch
/bulk/temp/2014-01-17/git-scan/src/GitScan/GitRepo.php:130
/bulk/temp/2014-01-17/git-scan/tests/GitScan/GitRepoTest.php:22
3) GitScan\GitRepoTest::testLocalOnly_ModifiedFile
RuntimeException: Failed to determine tracking branch
/bulk/temp/2014-01-17/git-scan/src/GitScan/GitRepo.php:130
/bulk/temp/2014-01-17/git-scan/tests/GitScan/GitRepoTest.php:34
4) GitScan\GitRepoTest::testLocalOnly_NewFile
RuntimeException: Failed to determine tracking branch
/bulk/temp/2014-01-17/git-scan/src/GitScan/GitRepo.php:130
/bulk/temp/2014-01-17/git-scan/tests/GitScan/GitRepoTest.php:46
5) GitScan\GitRepoTest::testLocalOnly_NewDir
RuntimeException: Failed to determine tracking branch
/bulk/temp/2014-01-17/git-scan/src/GitScan/GitRepo.php:130
/bulk/temp/2014-01-17/git-scan/tests/GitScan/GitRepoTest.php:58
6) GitScan\GitRepoTest::testLocalOnly_NewAndModifiedFiles
RuntimeException: Failed to determine tracking branch
/bulk/temp/2014-01-17/git-scan/src/GitScan/GitRepo.php:130
/bulk/temp/2014-01-17/git-scan/tests/GitScan/GitRepoTest.php:71
--
There were 2 failures:
1) GitScan\GitRepoTest::testIsFastForwardable_downstreamChanged
Failed asserting that true matches expected false.
/bulk/temp/2014-01-17/git-scan/tests/GitScan/GitRepoTest.php:181
2) GitScan\GitRepoTest::testIsFastForwardable_bothChanged
Failed asserting that true matches expected false.
/bulk/temp/2014-01-17/git-scan/tests/GitScan/GitRepoTest.php:193
FAILURES!
Tests: 49, Assertions: 103, Failures: 2, Errors: 6.
$ git --version
git version 1.8.5.2
Okay, I found the repository that causes the trouble:
$ git rev-parse --abbrev-ref @{upstream}
fatal: No upstream configured for branch 'magnific'
$ git branch -a -vv
* magnific eb8ce1b updated magnific popup
master 1f87cc6 [origin/master] no longer rely on deprecated SimplePie function
prettyphoto 7da7ab1 [origin/prettyphoto: ahead 1] Some style fixes
remotes/origin/HEAD -> origin/master
remotes/origin/magnific eb8ce1b updated magnific popup
remotes/origin/master 1f87cc6 no longer rely on deprecated SimplePie function
remotes/origin/prettyphoto 18fbf85 fixed javascript paging
OK, I haven't been able to reproduce that exact error message, but I reproduced an error message which included that one, so I used that in crafting a patch (e5eb5d1). The patch is included in the new tag, 2014-01-19, and the new phar download.
Let me know if it helps.
Yep, can confirm this fixes the problem for me.
Seems like it crashes when a repository has no upstream?