Filter out empty patterns in branch names