<commit_before>﻿using GitHub.Models;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;

namespace GitHub.UI.Converters
{
    public class BranchNameConverter : IMultiValueConverter
    {

        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            var branch = (IBranch)values[0];
            var repo = (IRemoteRepositoryModel)branch.Repository;
            //var localRepo = (ILocalRepositoryModel)values[1];
           
            if (repo.Parent != null)
            {
                return repo.Parent.Owner + ":" + branch.Name;
            }

            return branch.DisplayName;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            return null;
        }

    }
}<commit_msg>separate forked branches with parent owner name<commit_after>﻿using GitHub.Models;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;

namespace GitHub.UI.Converters
{
    public class BranchNameConverter : IMultiValueConverter
    {

        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            var branch = (IBranch)values[0];
            var remoteRepo = (IRemoteRepositoryModel)branch.Repository;
            var activeRepo = (IRepositoryModel)values[1];
           
            if (remoteRepo.Parent == null && !String.Equals(activeRepo.Owner, remoteRepo.Owner))
            {
                return remoteRepo.Owner + ":" + branch.Name;
            }

            return branch.DisplayName;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            return null;
        }

    }
}
{'fraction_non_alphanumeric': 0.08936376881981545, 'fraction_numerical': 0.001942690626517727, 'mean_word_length': 2.4915254237288136, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1452934', 'n_tokens_mistral': 536, 'n_tokens_neox': 533, 'n_words': 134}