Question

Will running cgit periodically cause any harm (since gerrit manipulates the repo with JGit)? Does JGit perform this function automatically?

Was it helpful?

Solution

Yes, it is safe to run git gc (or most any other cgit command) on the server while Gerrit is running.

No, jgit does not perform this automatically. Most groups using Gerrit have a script which runs gc once a week or so. I tried to find some more official documentation on this, but didn't see anything.

OTHER TIPS

Gerrit has a gc command of its own:

ssh -p 29418 review.example.com gerrit gc myProject yourProject

or

ssh -p 29418 review.example.com gerrit gc --all

The user doing this call has to be in the Administrator Group.

Source: https://gerrit-review.googlesource.com/Documentation/cmd-gc.html

JGit's gc implementation is still in review [1], should be ready soon.

[1] https://git.eclipse.org/r/#/c/4705/

Jgit is eclipse plugin for Git. When and how often to run "git gc" is given in this

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top