Skip to content

ap_git: force-create temp branch while shallow cloning from local repo#240

Merged
shiv-tyagi merged 1 commit intoArduPilot:mainfrom
shiv-tyagi:fix/stale-temp-branch
Apr 29, 2026
Merged

ap_git: force-create temp branch while shallow cloning from local repo#240
shiv-tyagi merged 1 commit intoArduPilot:mainfrom
shiv-tyagi:fix/stale-temp-branch

Conversation

@shiv-tyagi
Copy link
Copy Markdown
Member

Any failure between __branch_create and __branch_delete can leave behind a stale temp branch, which can cause failures when we try to create a branch with the same name in subsequent builds.

Since shallow_clone_at_commit_from_local is the only function that creates these temp branches and expects the temp branch to always track the required commit, we can force-create it to handle cases where a stale branch is left behind from a previous failure.

Any failure between `__branch_create` and `__branch_delete` can leave behind a stale temp branch, which can cause failures when we try to create a branch with the same name in subsequent builds.

Since `shallow_clone_at_commit_from_local` is the only function that creates these temp branches and expects the temp branch to always track the required commit, we can force-create it to handle cases where a stale branch is left behind from a previous failure.
@shiv-tyagi shiv-tyagi requested a review from peterbarker April 29, 2026 04:42
Copy link
Copy Markdown
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shiv-tyagi shiv-tyagi merged commit fecf719 into ArduPilot:main Apr 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants