Skip to content

Conversation

@felipeerias
Copy link
Collaborator

Add shallow_clone attribute to GitCache.
Implement shallow fetch with --depth 1 for specific commits/tags. Handle FETCH_HEAD checkout for commit hashes.
Use --single-branch for shallow local checkouts.

Add shallow_clone attribute to GitCache.
Implement shallow fetch with `--depth 1` for specific commits/tags.
Handle `FETCH_HEAD` checkout for commit hashes.
Use `--single-branch` for shallow local checkouts.
@aperezdc aperezdc self-assigned this Jan 13, 2026
@aperezdc aperezdc added the enhancement New feature or request label Jan 13, 2026
@aperezdc
Copy link
Member

@felipeerias Did you consider contributing this to upstream Cerbero? There's an open issue about this. There are some comments on there about breaking branch fetches when using --depth=1 so instead I think we should use --filter=tree:0 which will still save plenty of bandwidth while allowing Git to fetch trees and blobs on-demand if ever needed (more about this in this post, for those interested).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants