GC does not remove orphaned commits after ammend #4770

Closed
opened 2025-11-02 06:02:23 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @gregzawadzki on GitHub (Feb 1, 2020).

Git version: multiple

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

Description

(undefined) 81750b6f17
(master) d9ce8eac27

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

Originally created by @gregzawadzki on GitHub (Feb 1, 2020). ### 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](https://user-images.githubusercontent.com/3436356/73597730-7b24a500-452f-11ea-87e2-a21567c364c3.png)
GiteaMirror added the type/question label 2025-11-02 06:02:23 -06:00
Author
Owner

@stale[bot] commented on GitHub (Apr 2, 2020):

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.

@stale[bot] commented on GitHub (Apr 2, 2020): 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.
Author
Owner

@gregzawadzki commented on GitHub (Apr 28, 2020):

Valid :)

@gregzawadzki commented on GitHub (Apr 28, 2020): Valid :)
Author
Owner

@guillep2k commented on GitHub (Apr 29, 2020):

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 commented on GitHub (Apr 29, 2020): 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.
Author
Owner

@gregzawadzki commented on GitHub (Apr 30, 2020):

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

@gregzawadzki commented on GitHub (Apr 30, 2020): @guillep2k Thank you. Can I login somehow into docker and run AGGRESSIVE every while? :) Maybe that would be solution :) Thx in advance
Author
Owner

@zeripath commented on GitHub (Apr 30, 2020):

yes you certainly could do that.

@zeripath commented on GitHub (Apr 30, 2020): yes you certainly could do that.
Author
Owner

@a1012112796 commented on GitHub (May 1, 2020):

Hello, I found gc parameter is a configurable option in app.ini, you can change it if you need.
@seigieu
See:
1bdffefc05/custom/conf/app.ini.sample (L882-L885)

@a1012112796 commented on GitHub (May 1, 2020): 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
Author
Owner

@techknowlogick commented on GitHub (May 1, 2020):

Closing as resolved. thanks @a1012112796 :)

@techknowlogick commented on GitHub (May 1, 2020): Closing as resolved. thanks @a1012112796 :)
Author
Owner

@gregzawadzki commented on GitHub (May 1, 2020):

@a1012112796 Thank you very much!

@gregzawadzki commented on GitHub (May 1, 2020): @a1012112796 Thank you very much!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4770