Git source: Make a shallow clone.
Metadata
Current evaluation
Merged #248 (commit 6ebd8e68d; merge 321b13277), changing Git sources from full clones to depth-1 shallow clones and resolving LP #1536696.
Resolution: closed resolved
Reason: PR #248 was merged with commit 6ebd8e68d, making Git source clones depth 1 instead of fetching complete history. The change directly resolved Launchpad bug #1536696.
Evaluated by: mr-cal-bot
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #248 (commit 6ebd8e68d; merge 321b13277), changing Git sources from full clones to depth-1 shallow clones and resolving LP #1536696. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/snapcraft#248, changing the git source to depth-1 shallow clones instead of fetching full history; resolves Launchpad bug #1536696. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/snapcraft#248 (321b13277): Git sources now use depth-1 shallow clones, resolving LP #1536696; backported to 1.x by #250. | |
| 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. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcraft (launchpad)#1536696
(confidence 100%)
Launchpad bug reporting that Git sources cloned all history, resolved by #248.
-
Related To:
canonical/snapcraft#250
(confidence 98%)
Merged backport of #248 carrying the shallow-clone fix to the 1.x branch.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1476 fix(git-source): only shallow fetch if a source-depth is provided | craft-parts | merged | Merged as commit f1e2c927 (#1476): git-source now shallow-clones only when a non-zero source-depth is set, so full-hash source-commit no longer forces a shallow fetch. Released in craft-parts 2.28.1 and merged back via #1481. | |
| #1536696 Git source clones all history | snapcraft (launchpad) | closed | Fixed by merged PR canonical/snapcraft#248 (commit 6ebd8e68d, merge 321b13277): Git sources now use a depth-1 shallow clone instead of fetching full history. Maintainer kyrofa linked the PR as the fix for LP #1536696. | |
| #1378 fix: shallow clone with source-commit if possible | craft-parts | merged | Merged PR #1378 as ae26318e: Git pulls now prefer a shallow fetch for source-commit when possible, with deep-fetch fallback, fixing #1360. | |
| #250 Backport to 1.x: Git source: Make a shallow clone. | snapcraft | merged | Merged PR #250 backported #248 to 1.x, making Git sources use shallow clones instead of downloading full repository history. | |
| #814 Make source-depth a parameter and opt-in | snapcraft | merged | Merged #814 in commit 190463c3c, making source-depth an explicit, opt-in part property instead of enabling shallow Git clones by default. | |
| #1617783 Git clone with --depth=1 loses the tags | snapcraft (launchpad) | closed | Fixed by merged PR snapcore/snapcraft#814 (commit 190463c3c): Git clones became full-depth by default, with source-depth available as an explicit opt-in. | |
| #2968 git: always fetch specified source-commit before using | snapcraft | merged | Merged #2968 in commit 3941e7918; Git sources now fetch the requested source-commit from origin, fixing missing-commit and shallow-clone failures. | |
| #792 Fix `git clone` when transport is http and it does not support --depth | snapcraft | closed | PR #792 (drop --depth=1 for HTTP git sources) was closed unmerged; maintainers landed the fix differently in merged PR #814 (commit 190463c3c), making shallow clones opt-in via the source-depth part property, tracking LP bug #1617783. | |
| #249 Git source: Support submodules. | snapcraft | merged | Merged canonical/snapcraft#249 via 1984cb339, adding recursive Git cloning and submodule updates on pull to resolve LP #1536698. | |
| #6067 fix: allow for deep clones with source-commit | snapcraft | merged | Merged #6067 as 8dd4ca40c, bumping Craft Parts to adopt #1476 and allow deep clones for source-commit builds. |