|
|
Log in / Subscribe / Register

shallow clones are bad?

shallow clones are bad?

Posted Sep 1, 2026 7:19 UTC (Tue) by taladar (subscriber, #68407)
In reply to: shallow clones are bad? by mricon
Parent article: Ryabitsev: Creepy crawlies

For high traffic servers like kernel.org, would it perhaps make sense to have the shallow clone pack already prepared for the head of commonly shallow clones branches?


to post comments

shallow clones are bad?

Posted Sep 1, 2026 14:05 UTC (Tue) by mricon (subscriber, #59252) [Link] (2 responses)

There's no reasonable way to do this, because everyone's shallow clone is different. Some will want --depth 0, some --depth 10, others just commits and no blobs. The only predictable pack we can create is when someone making a full clone.

shallow clones are bad?

Posted Sep 2, 2026 7:38 UTC (Wed) by taladar (subscriber, #68407) [Link] (1 responses)

I would assume the vast majority of CI wants exactly the content of the current commit a branch points to to build that. Plus maybe some metadata on the commit itself (like its commit hash and tags) to include in the built --version output.

shallow clones are bad?

Posted Sep 2, 2026 14:30 UTC (Wed) by mathstuf (subscriber, #69389) [Link]

CI should not point to branches. The forge should reserve a ref for a CI pipeline to use based on the branch (e.g., GitLab uses refs/pipelines/PIPELINE_ID). Just because the branch was on commit X when the pipeline was created doesn't mean that a job started an hour from now won't get commit Y when asking for the same branch name.

Tags are also not populated (by default) when forking, so you may also need a step to fetch tags from the target project in addition to the code from the source project.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds