How to disable receive.autogc in Gerrit 3.2

150 views
Skip to first unread message

Sun King

unread,
Jan 29, 2022, 2:22:31 AM1/29/22
to Repo and Gerrit Discussion
Hello sir,
I know the receive.autogc  is auto disabled in Gerrit 3.3 in [1]
So is there a way to make it  in Gerrit 3.2 ?
As I configed as followings in jgit.config ,but with no luck.
Because packed-refs file updated when GIT PUSH done.

[receive]
        autogc = false


Am I miss something?
Thank you.

David Ostrovsky

unread,
Jan 29, 2022, 6:41:24 AM1/29/22
to Repo and Gerrit Discussion
king...@gmail.com schrieb am Samstag, 29. Januar 2022 um 08:22:31 UTC+1:
Hello sir,
I know the receive.autogc  is auto disabled in Gerrit 3.3 in [1]
So is there a way to make it  in Gerrit 3.2 ?
As I configed as followings in jgit.config ,but with no luck.
Because packed-refs file updated when GIT PUSH done.

[receive]
        autogc = false



This should work as advertised. receive.autogc is respected since the auto GC
feature was introduced in JGit: [1]. Gerrit's jgit.config file delegation was added
in Gerrit 3.1 release: [2].

Sun King

unread,
Feb 7, 2022, 1:05:43 AM2/7/22
to Repo and Gerrit Discussion
It came into this eventhough I have upgraded Gerrit from 3.2.3 to 3.3.0... this makes no sense...
And log shows Gerrit still read configuration from Gerrit-Site/etc/jgit.config which was deleted... Very Strange.

INFO  com.google.gerrit.server.git.SystemReaderInstaller : Set JGit's SystemReader to read system config from /home/work/gerrit-site/etc/jgit.config

Any suggestion is welcome.
BR,
sk.

luca.mi...@gmail.com

unread,
Feb 7, 2022, 2:42:26 AM2/7/22
to Repo and Gerrit Discussion, Sun King


Sent from my iPhone

On 7 Feb 2022, at 06:05, Sun King <king...@gmail.com> wrote:

It came into this eventhough I have upgraded Gerrit from 3.2.3 to 3.3.0... this makes no sense...

What it makes no sense to you? Can you clarify with other words?

And log shows Gerrit still read configuration from Gerrit-Site/etc/jgit.config which was deleted... Very Strange.

Who deleted the Jgit.config?


INFO  com.google.gerrit.server.git.SystemReaderInstaller : Set JGit's SystemReader to read system config from /home/work/gerrit-site/etc/jgit.config


Yes, that is the expected behaviour.

Luca

Any suggestion is welcome.
BR,
sk.
在2022年1月29日星期六 UTC+8 19:41:24<David Ostrovsky> 写道:
king...@gmail.com schrieb am Samstag, 29. Januar 2022 um 08:22:31 UTC+1:
Hello sir,
I know the receive.autogc  is auto disabled in Gerrit 3.3 in [1]
So is there a way to make it  in Gerrit 3.2 ?
As I configed as followings in jgit.config ,but with no luck.
Because packed-refs file updated when GIT PUSH done.

[receive]
        autogc = false



This should work as advertised. receive.autogc is respected since the auto GC
feature was introduced in JGit: [1]. Gerrit's jgit.config file delegation was added
in Gerrit 3.1 release: [2].

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/75f397eb-7161-408c-9691-30910ff9a046n%40googlegroups.com.

Sun King

unread,
Feb 7, 2022, 3:46:02 AM2/7/22
to Repo and Gerrit Discussion
Hi luca,
I upgraded Gerrit from 3.2.3 to 3.3.0 cause receive.autogc  is auto disabled in Gerrit 3.3, right?
And  I want to use the default jgit.config so I deleted the jgit.config in /etc/ folder.
So on my opinion receive.autogc should work with Gerrit 3.3.0 ,but no luck.
The packed-refs still updated when I do a push action.

BR.

Luca Milanesio

unread,
Feb 7, 2022, 4:39:53 AM2/7/22
to Repo and Gerrit Discussion, Luca Milanesio, Sun King

On 7 Feb 2022, at 08:46, Sun King <king...@gmail.com> wrote:

Hi luca,
I upgraded Gerrit from 3.2.3 to 3.3.0 cause receive.autogc  is auto disabled in Gerrit 3.3, right?

Not exactly: Gerrit 3.3.x sets ‘receive.autogc’ into your $GERRIT_SITE/etc/jgit.config. However, if you change the setting or remove it, it won’t be effective anymore and the autogc will continue to be enabled.

And  I want to use the default jgit.config so I deleted the jgit.config in /etc/ folder.

You mean $GERRIT_SITE/etc/jgit.config?
If yes, then you will have autogc enabled again, which is the default in JGit.

HTH

Luca.

Reply all
Reply to author
Forward
0 new messages