Gitea: GC does not remove orphaned commits after ammend

Created on 1 Feb 2020  路  8Comments  路  Source: go-gitea/gitea

Git version: multiple

  • 10.0.3
  • 10.0.0
  • 1.12.0+dev-234-g046bb0597 (try.gitea)

Description

(undefined) https://try.gitea.io/seigieu/test/commit/81750b6f17116fe1eef6e613d747f0f0bfe9da23
(master) https://try.gitea.io/seigieu/test/commit/d9ce8eac27f3d7151cc8c8711c01d9d6b47ccfdf

master is ammend of undefined commit. Garbarge collector does not clear orphaned commits

It happens on my gitea install as well as on try.gitea - where i prepared example 1 week ago.
Waited if it will get cleared - it didn't.
On my side/instance: Ran all GC from admin panel. Orphans does not get removed and stay forever.

Screenshots

obraz

kinquestion

Most helpful comment

Hello, I found gc parameter is a configurable option in app.ini, you can change it if you need.
@seigieu
See:
https://github.com/go-gitea/gitea/blob/1bdffefc052fca440b1d4b59a5e6d402f0836374/custom/conf/app.ini.sample#L882-L885

All 8 comments

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

Valid :)

https://git-scm.com/docs/git-gc

--aggressive

    Usually git gc runs very quickly while providing good disk space utilization
and performance. This option will cause git gc to more aggressively optimize
the repository at the expense of taking much more time. The effects of this
optimization are mostly persistent. See the "AGGRESSIVE" section below for details.

I don't believe Gitea runs gc with --aggressive; it would probably be a waste of resources to get a marginal gain.

Also, the default expiration for unreachable entries is 30 days. Check the reflogExpireUnreachable parameter on the same page.

@guillep2k Thank you. Can I login somehow into docker and run AGGRESSIVE every while? :) Maybe that would be solution :) Thx in advance

yes you certainly could do that.

Hello, I found gc parameter is a configurable option in app.ini, you can change it if you need.
@seigieu
See:
https://github.com/go-gitea/gitea/blob/1bdffefc052fca440b1d4b59a5e6d402f0836374/custom/conf/app.ini.sample#L882-L885

Closing as resolved. thanks @a1012112796 :)

@a1012112796 Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kolargol picture kolargol  路  3Comments

jorise7 picture jorise7  路  3Comments

Fastidious picture Fastidious  路  3Comments

kifirkin picture kifirkin  路  3Comments

flozz picture flozz  路  3Comments