Git source: Make a shallow clone.
Metadata
Current evaluation
Merged changes to the git source that replace full history fetches with a depth-1 shallow clone, resolving Launchpad bug #1536696. The update modifies two files and received reviewer approval.
Suggested action: —
No scores available.
Issue body
This PR resolves LP: [#1536696](https://bugs.launchpad.net/snapcraft/+bug/1536696) by making the git source use a shallow (depth of 1) clone rather than fetching the entire history.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged changes to the git source that replace full history fetches with a depth-1 shallow clone, resolving Launchpad bug #1536696. The update modifies two files and received reviewer approval. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to configure the git source for shallow cloning at depth 1 instead of fetching full history, resolving Launchpad bug 1536696. Approved by @come-maiz. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged implementation switching the git source to a shallow clone with depth 1 instead of fetching full history, resolving Launchpad bug #1536696. Approved by @come-maiz. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #249 Git source: Support submodules. | snapcraft | merged | Merged implementation adding recursive git cloning to support submodules, resolving Launchpad bug #1536698. Submodules update on pull. Changes affect two files. Merged despite reviewer requests for integration tests. | |
| #250 Backport to 1.x: Git source: Make a shallow clone. | snapcraft | merged | Merged a backport of PR #248 to the 1.x branch, implementing shallow cloning for the Git source. The change modifies two files (+6/-6 lines) to optimize repository checkout. | |
| #1476 fix(git-source): only shallow fetch if a source-depth is provided | craft-parts | merged | Merged fix making git shallow fetch opt-in, applying only when source-depth is explicitly non-zero. Prevents unintended shallow clones that broke cherry-pick builds. Approved by three reviewers and merged to hotfix/2.28 for craft parts 2.28.0. | |
| #1378 fix: shallow clone with source-commit if possible | craft-parts | merged | Merged to resolve issue #1360 and CRAFT-4853. Optimizes shallow cloning when a source commit is available. Approved by two reviewers, passed all CI checks, and modified three files with 233 additions and 20 deletions. | |
| #1536696 Git source clones all history | snapcraft (launchpad) | closed | Closed without implementation. The report that Snapcraft unnecessarily clones full Git history instead of fetching only the latest commit was abandoned due to prolonged inactivity. |