Using same function to extract local and remote branches from packedrefs file