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

Pack size of GitRepo is much bigger than local clone #1005

Closed
mliebelt opened this issue Jan 18, 2016 · 3 comments
Closed

Pack size of GitRepo is much bigger than local clone #1005

mliebelt opened this issue Jan 18, 2016 · 3 comments

Comments

@mliebelt
Copy link

We have faced the strange situation that a repository on the server was around 12 GB big, where a local clone was only around 60 MB big (see the question on stackoverflow about it).

We cannot explain why this was the case, but we would like to know if the repository on the server is shrunk on a regular time basis. At least the UI tells us though:

  • Go to Repository > Edit
  • There the tab GC
  • You will read the sentence: "The garbage collector will pack loose objects pushed from clients and will remove unreferenced objects from the repository."
  • We have not changed the default there (7 days, ...)

However, after our operation team has done a git gc --prune --agressive on the repository, the repository shrunk from 12 GB to ~ 110 MB.

So these are 2 questions:

  • Is it dangerous to do something by hand like that?
  • Is that different to doing an automatic GC triggered by GitBlit?
@gitblit
Copy link
Collaborator

gitblit commented Jan 18, 2016

GC is still an experimental feature of Gitblit. What version of Gitblit are you running? Did you enable the GC feature? It's disabled by default.

@mliebelt
Copy link
Author

Thank's for the hint, so I misunderstood the UI. I just had a look, saw the tab "GC" and the default values, but after hoovering over the values, I saw I cannot change them. So I think the feature is disabled at the moment.

I have found the documentation about the settings for garbabe collection. It reads for me that this will lead to the call of git gc --prune without --agressive, is that true?

Btw, you can close the ticket then.

@gitblit
Copy link
Collaborator

gitblit commented Jan 19, 2016

Gitblit, being nearly pure Java, does not use native git. Instead the JGit garbage collector is used. While the JGit GC may (now) support prune and/or aggressive these options are not specified since initially JGit didn't support hardly any values here and Gitblit's GC service has not been touched in a while.

@gitblit gitblit closed this as completed Jan 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants