libgit2 and garbage collection on remote #6669
Unanswered
vineetdigit
asked this question in
General
Replies: 1 comment
-
There's no API to call to do a garbage collection. It's not part of the git protocol, and AFAIK, no hosting provider exposes a custom API to do this. If you own the server, you can do whatever garbage collection logic you wish. If you don't, you'll need to talk to your hosting provider about how GC happens. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am working on an application that uses libgit2 binding where I need to perform an equivalent of a pull request. E.g. the user pushes a ref to a remote, where discussion takes place about the changes before merge is approved.
I'm wondering if the user decides to delete the ref, what will happen to the commits that were pushed? From what I understand, the dangling commits need to be cleared by running gc and libgit2 provides no programmatic way to trigger gc.
What libgit2 apis can trigger gc after a ref is deleted? Since I have programmatic access to both the remote and the clone, I can either directly delete the ref in the remote repo or I can make a push from the clone to delete the remote ref. But after that point, which apis need to be invoked so that the ref is gc'ed at the remote?
thx,
Vineet
Beta Was this translation helpful? Give feedback.
All reactions