Files
lazygit/pkg/gui/controllers/helpers
Stefan HallerandClaude Opus 5.5 fb1b6ed1c1 Don't offer to push or pull branches merged into a local main branch
When pushing master, lazygit offers to push other branches along with
it if they were merged into master locally and have unpushed commits.
Pulling master offers to update such branches in the same way. These
branches aren't part of a stack, so the menu only adds an extra step to
an ordinary push or pull.

This happens because a branch counts as stacked below the current one
if its tip is one of the current branch's commits that aren't merged
into a main branch yet. A commit's merged status only looks at the
remote branch of each main branch. So until master is pushed, the
commits that were merged into it locally count as unmerged. The same
goes for pushing or pulling a feature branch on top of such a master.

Treat the commits that a local main branch contains as merged too, so
that the search for stacked branches stops at a main branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:12:36 +01:00
..