3

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

jnorris
  • 6,350
  • 8
  • 30
  • 33

4 Answers4

6

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.

Brad
  • 5,492
  • 23
  • 34
4

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

Christoph Grimmer
  • 4,210
  • 4
  • 40
  • 64
2

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

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

Matthias Sohn
  • 264
  • 2
  • 1
-3

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

Community
  • 1
  • 1
vpatil
  • 3,380
  • 1
  • 17
  • 9
  • 1
    Downvoted cause: if op asks about JGit, he already knows what is it, so your first sentence is meaningless. The last part is just a link so somewhere (and not even an excerpt) so it could be a comment, not answer. – om-nom-nom Mar 30 '12 at 19:05
  • 1
    JGit is not the eclipse plugin, EGit is (which happens to use JGit). EGit is sort of irrelevant to this question. – jnorris Mar 30 '12 at 22:24