improve get_merged_branches

was breaking 'delete merged branches'