This is an automated email from the ASF dual-hosted git repository.
sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 7350fc247 ci: Check out mcuboot main as detached HEAD
7350fc247 is described below
commit 7350fc247855f47a24e0ecda37b3bd4d59c907f3
Author: Szymon Janc <[email protected]>
AuthorDate: Fri Oct 16 11:11:01 2026 +0200
ci: Check out mcuboot main as detached HEAD
Jobs testing with mcuboot main branch failed with:
! [rejected] main -> main (non-fast-forward)
Since repositories are restored from cache, mcuboot local main branch
points to upstream main from the time cache was created. Repository is
shallow, so after upstream main moved forward git cannot verify that
update of local branch is fast-forward and rejects it.
Fetch main and check out FETCH_HEAD as detached HEAD instead, so that
state of local branches stored in cache does not matter. Fetch with
depth 1, as otherwise whole history would be downloaded if commit
restored from cache is not an ancestor of upstream main.
Assisted-by: Claude:claude-opus-5-5
---
.github/workflows/build.yml | 4 ++--
.github/workflows/build_bootloader_main.yml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index de5673690..f19d36671 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -397,8 +397,8 @@ jobs:
shell: bash
run: |
cd build/repos/mcuboot
- git fetch origin main:main
- git checkout main
+ git fetch --depth=1 origin main
+ git checkout --detach FETCH_HEAD
- name: newt test all
run: |
cd build
diff --git a/.github/workflows/build_bootloader_main.yml
b/.github/workflows/build_bootloader_main.yml
index eaab17cc4..c01940000 100644
--- a/.github/workflows/build_bootloader_main.yml
+++ b/.github/workflows/build_bootloader_main.yml
@@ -59,8 +59,8 @@ jobs:
run: |
cd build
cd repos/mcuboot
- git fetch origin main:main
- git checkout main
+ git fetch --depth=1 origin main
+ git checkout --detach FETCH_HEAD
cd ../..
bash ../.github/test_build_bootloader_main.sh
newt test @mcuboot/boot/boot_serial