You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delete a cached Git repository from the UI and API #685
Follow-up to #675, which lists cached Git repositories on /ui/git.
Today the only way to remove one repository from the git cache is to stop the server and delete its directory under git.cache_dir. Deleting it while the server runs leaves the cache's size accounting wrong until the next start and can break a running fetch.
Proposal, behind the existing cache_delete setting:
DELETE /api/git/{upstream}/{path}.git removes one cached repository, and /ui/git gets a Delete button per row, sending to /ui/api/git/... like the version page does for artifacts.
It reuses the eviction path: the repository is dropped from the cache at once, so the next request clones it again, and its directory is removed once no request is reading it.
A repository in the middle of a clone or fetch answers 409 rather than waiting.
The response says what was removed and how many bytes are freed.
I'd open the PR after #675 is in. Does this fit, or would you rather keep git out of cache_delete?
Activity