mirror of
https://github.com/systemd/systemd
synced 2025-10-06 00:13:24 +02:00
There's no guarantee that $GIT_BRANCH is always the same across stable release branches and main. But we still need to make sure we switch commits if we're switching between main and release branches. To make this work, let's not check if the current HEAD commit is an ancestor of the currently configured origin branch. Instead, let's check if any of the origin branches contains the current HEAD commit. This still makes sure that we won't switch commits if we're working on a local branch while making sure that we do switch commits if we're switching between main and stable release branches with different git branches configured for the packaging repo checkout.