Add utility to identify branches merged to upstream#3
Draft
Add utility to identify branches merged to upstream#3
Conversation
- Created list_merged_branches.py to identify local branches that have been merged upstream - Added shell wrapper script list-merged-branches.sh for easy usage - Script supports checking current branch or all branches with --all flag - Includes --fetch option to update remote before checking - Provides helpful error messages when remote is not configured Co-authored-by: de-nordic <56024351+de-nordic@users.noreply.github.com>
- Created comprehensive README with usage examples - Documented all command-line options - Included troubleshooting section - Added examples for common use cases Co-authored-by: de-nordic <56024351+de-nordic@users.noreply.github.com>
- Replace bare except clauses with 'except Exception' - Improves error handling to not catch system exits and keyboard interrupts - Addresses code review feedback Co-authored-by: de-nordic <56024351+de-nordic@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fetch merged branches from zephyrproject
Add utility to identify branches merged to upstream
Feb 6, 2026
de-nordic
pushed a commit
that referenced
this pull request
Mar 20, 2026
1. Mostly complete. Supports MPU, userspace, PSPLIM-based stack guards, and FPU/DSP features. ARMv8-M secure mode "should" work but I don't know how to test it. 2. Designed with an eye to uncompromising/best-in-industry cooperative context switch performance. No PendSV exception nor hardware stacking/unstacking, just a traditional "musical chairs" switch. Context gets saved on process stacks only instead of split between there and the thread struct. No branches in the core integer switch code (and just one in the FPU bits that can't be avoided). 3. Minimal assembly use; arch_switch() itself is ALWAYS_INLINE, there is an assembly stub for exception exit, and that's it beyond one/two instruction inlines elsewhere. 4. Selectable at build time, interoperable with existing code. Just use the pre-existing CONFIG_USE_SWITCH=y flag to enable it. Or turn it off to evade regressions as this stabilizes. 5. Exception/interrupt returns in the common case need only a single C function to be called at the tail, and then return naturally. Effectively "all interrupts are direct now". This isn't a benefit currently because the existing stubs haven't been removed (see #4), but in the long term we can look at exploiting this. The boilerplate previously required is now (mostly) empty. 6. No support for ARMv6 (Cortex M0 et. al.) thumb code. The expanded instruction encodings in ARMv7 are a big (big) win, so the older cores really need a separate port to avoid impacting newer hardware. Thankfully there isn't that much code to port (see #3), so this should be doable. Signed-off-by: Andy Ross <andyross@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Developers maintaining forks need to identify local branches already merged to
zephyrproject-rtos/zephyrfor cleanup and tracking.Implementation
scripts/list_merged_branches.py: Usesgit branch --mergedto detect branches incorporated upstreamscripts/list-merged-branches.sh: Shell wrapper for conveniencescripts/list_merged_branches.README.md: Documentation with examplesUsage
Prerequisites
Script supports custom remote/branch names via
--remoteand--branchflags.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.