feat: allow short commit hashes
Metadata
Current evaluation
Merged in canonical/craft-parts#1024 (commit 8f544241); source-commit now accepts abbreviated hashes, fixing #1008 and shipping in 2.7.0.
Resolution: closed resolved
Reason: PR #1024 was merged as commit 8f544241 and added short source-commit hash support. The 2.7.0 changelog confirms the feature shipped.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
-----
Previously, `source-commit` could only accept full length (40 character) hashes. Now, `source-commit` can accept short hashes.
I recommend reviewing by commit because the first commit is a refactor that moves a bunch of tests.
Fixes #1008
(CRAFT-4127)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/craft-parts#1024 (commit 8f544241); source-commit now accepts abbreviated hashes, fixing #1008 and shipping in 2.7.0. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1024 in commit 8f544241, enabling source-commit to accept short Git hashes and fixing issue #1008. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1024 in commit 8f544241, adding short Git hash support to source-commit and fixing #1008. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged following approval by two reviewers. The update allows source-commit to accept short hashes instead of requiring full 40-character strings, resolving issue #1008. Changes span seven files with +630/-383 lines. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Updates source-commit to accept short commit hashes instead of only full 40-character hashes. Resolves #1008 and CRAFT-4127. Author mr-cal force rebased and merged the changes. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-parts#1008
(confidence 100%)
Tracking issue for short source-commit hashes, explicitly fixed by PR #1024.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1008 Support short git hashes in `source-commit` | craft-parts | closed | Short source-commit hashes are now expanded with git rev-parse before fetching. Fixed by merged PR #1024 (commit 8f544241) and released in craft-parts 2.7.0. | |
| #925 feat: use "craft.git" for git where possible | craft-parts | merged | Merged in canonical/craft-parts#925 via commit 11be8c7a, preferring craft.git when available and falling back to git; fixes #900. |