← Back to issue list

fix: shallow clone with source-commit if possible

View original Github issue

Metadata

Project
craft-parts
Number
#1378
Type
pull request
State
merged
Author
bepri
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1378 as ae26318e: Git pulls now prefer a shallow fetch for source-commit when possible, with deep-fetch fallback, fixing #1360.

Resolution: closed resolved

Reason: Merged as commit ae26318e after approval and with all CI checks passing. The change attempts shallow cloning for source-commit, falling back to a deep fetch when unsupported.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [ ] Have you followed the guidelines for contributing? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint && make test`? - [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? --- Fixes #1360. CRAFT-4853

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1378 as ae26318e: Git pulls now prefer a shallow fetch for source-commit when possible, with deep-fetch fallback, fixing #1360.
stealth/space-bunny-alpha — closed resolved Merged #1378 as ae26318e, fixing #1360 by preferring a shallow clone for source-commit instead of exhausting disk space with unbounded fetching.
qwen/qwen3.6-35b-a3b — — 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.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix for issue #1360 that enables shallow cloning with source-commit when available. Resolves CRAFT-4853. The change was integrated into the main branch without additional review comments.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-parts#1360 (confidence 100%)

    The PR explicitly states that it fixes the unbounded-fetch and disk-space issue reported in #1360.

Related issues

Issue Project State Summary Similarity
#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.
81%
#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.
78%
#248 Git source: Make a shallow clone. snapcraft merged Merged #248 (commit 6ebd8e68d; merge 321b13277), changing Git sources from full clones to depth-1 shallow clones and resolving LP #1536696.
77%
#1600 fix(git): checkout commit before updating submodules craft-parts merged PR #1600 (commit d2845976) merged, fixing #898: the deep-clone fallback for source-commit now clones without submodules, fetches and checks out the commit, then updates submodules, matching the shallow path.
77%
#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.
75%
#1360 `source-commit` never completes, fills up entire disk space craft-parts closed Fixed by merged PR #1378 (commit ae26318e), which makes source-commit pulls use a shallow direct fetch when possible, avoiding runaway disk usage.
72%
#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.
70%