Skip to content

show-{merged,unmerged}-branches will ignore any branch name containing the default branch name #1271

Description

@ferdnyc

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions