The show-merged-branches and show-unmerged-branches scripts both pipe their output through a series of greps which include:
| grep -v "$(git_extra_default_branch)"
...Which will exclude any branch with a name that contains the default branch name, not merely matches it. For example, in this set of branches:
$ git branch --merged
a-branch
+ an-other
+ main
mainly-merged-code
+ remaining-work
returned-to-main
If the default branch name is main, all of the last four branches would be hidden from a git show-merged-branches listing, not only main itself:
$ git show-merged-branches
a-branch
+an-other
The
show-merged-branchesandshow-unmerged-branchesscripts both pipe their output through a series ofgreps which include:...Which will exclude any branch with a name that contains the default branch name, not merely matches it. For example, in this set of branches:
If the default branch name is
main, all of the last four branches would be hidden from agit show-merged-brancheslisting, not onlymainitself: