remote_build: handle git push in detached head state
Metadata
Current evaluation
Merged PR #2564 (commit 41c7adaf9), fixing remote builds from detached HEAD by using HEAD when Git branch lookup fails.
Resolution: closed resolved
Reason: PR #2564 was merged as commit 41c7adaf9. It returns HEAD instead of raising an exception when remote-build runs in a detached HEAD state.
Evaluated by: mr-cal-bot
No scores available.
Issue body
When dispatching a remote build job using --git and we're currently in
detached head state, branch name retrieval raises an exception. Fix that
by returning HEAD if detached head is detected.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2564 (commit 41c7adaf9), fixing remote builds from detached HEAD by using HEAD when Git branch lookup fails. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2564 (commit 41c7adaf9), fixing remote builds in detached HEAD state by returning HEAD when branch-name retrieval would fail. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for remote_build that resolves a detached HEAD exception by returning HEAD instead of failing branch name retrieval. Approved by reviewer and passed CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix resolving a branch name retrieval exception during remote builds in a detached HEAD state. The change returns HEAD instead of raising an error. Resolved after rebase and maintainer approval. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #310 fix(remote-build): enable git repo check | craft-application | merged | Merged PR #310 in commit 28429b84, enabling remote builds to check Git cleanliness before staging and committing copied project changes. | |
| #3056 remote-build: package up local sources with source-type 'git' | snapcraft | merged | Merged PR #3056 in commit ccfd349af, making remote-build package local Git sources declared with source-type: git. | |
| #1358 feat: suppress detached head message | craft-parts | merged | Merged PR #1358 as commit 4cddc2ec, adding advice.detachedHead=false to Git clone commands and tests to suppress verbose detached-HEAD output. |