Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.git folder is huge #1355

Closed
czosel opened this issue Apr 23, 2018 · 8 comments
Closed

.git folder is huge #1355

czosel opened this issue Apr 23, 2018 · 8 comments

Comments

@czosel
Copy link
Contributor

czosel commented Apr 23, 2018

I got a timeout when I was trying to install PHPWord with composer. It seems that the .git folder is huge:

$ du -h --max-depth=1
2.1M	./src
1.9M	./tests
144K	./docs
1.2M	./samples
336M	./.git

Can someone tell how this happened, and if there would be a chance to do some history-rewriting to slim the .git folder down?

If you like, this could also be considered a composer issue (see composer/composer#3449).

@czosel
Copy link
Contributor Author

czosel commented Apr 24, 2018

git gc is run automatically on remote git repos, so that doesn't help. This answer on SO shows how to find the largest files in a git repo, which returns something like this in our case (listing only some of the biggest files):

(...)
66d14527d422  3,8MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
d5386d4c852b  3,8MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
14eefc645832  3,8MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
c6a6da8442c3  3,8MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
e6d905ba0436  3,8MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
0b04872ad4c1  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
807796c3f422  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
05c2d849df86  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
27b093aa95bf  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
41f9ce746399  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
8924416f1a49  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
bc53f5ed02fd  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
c056639544a8  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
f21cabd66869  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html
fdf5198467e7  3,9MiB coverage/develop/Writer/Word2007/Part/Theme.php.html

It seems that the massive .git folder is essentially filled with old coverage reports. I'd suggest running some filter-branch magic to get rid of them, what do you think @troosan?

@czosel
Copy link
Contributor Author

czosel commented Apr 24, 2018

Oh, looking at where those files are coming from reveals that this is a CI issue:

commit 04192091191069e2692f52f8b9eb5449da2ce5cc
Author: travis-ci <travis@travis-ci.org>
Date:   Wed Apr 18 07:11:36 2018 +0000

    PHPDocumentor (Travis Build: 1695  - Branch: develop)

cp -Rf $HOME/coverage-latest/* ./coverage/$TRAVIS_BRANCH/

I'm not sure what the motivation is behind this? Maybe uploading the coverage could just be removed?

@troosan
Copy link
Contributor

troosan commented Apr 25, 2018

Indeed, I don't think there is much added value in keeping those code coverage reports and phpDocumentation.
Maybe we could track code coverage with https://github.com/marketplace/coveralls?
What do you think @Progi1984, does anybody check the content of the gh-pages anyway?

@czosel
Copy link
Contributor Author

czosel commented Apr 25, 2018

I didn't even find the gh-pages, are they supposed to be here?
http://phpoffice.github.io/PHPWord/docs/master/

@troosan
Copy link
Contributor

troosan commented Apr 25, 2018

The github pages were dropped a couple of months ago

https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/

czosel added a commit to adfinis-forks/PHPWord that referenced this issue Apr 26, 2018
czosel added a commit to adfinis-forks/PHPWord that referenced this issue Apr 26, 2018
@Progi1984
Copy link
Member

@troosan I agree to delete gh-pages and migrate to coveralls. I think doing the same thing for PHPPresentation.

@czosel
Copy link
Contributor Author

czosel commented May 19, 2018

@Progi1984 Awesome! I updated #1360 to include coveralls integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants