private static void BuildTree(List<string> sourcePaths, TreeViewModel oldParsed, char pathSeparator = '/')
        {
            Action<TreeViewModel, IEnumerable<string>, string> ensureExists = null;
            ensureExists = (ftm, ts, fullPath) =>
            {
                if (ts.Any())
                {
                    var title = ts.First();
                    var child = ftm.Children.SingleOrDefault(x => x.Title == title);
                    if (child == null)
                    {
                        child = new TreeViewModel
                        {
                            Title = title,
                            FullPath = fullPath,
                            Children = new List<TreeViewModel>(),
                        };
                        ftm.Children.Add(child);
                    }
                    ensureExists(child, ts.Skip(1), fullPath);
                }
            };

            foreach (var path in sourcePaths)
            {
                if (path.EndsWith(".cs")
                        //|| path.EndsWith("config")
                        || path.EndsWith(".xml")
                        || path.EndsWith(".cmd")
                        || path.EndsWith(".txt")
                        || path.EndsWith(".ini")
                        || path.EndsWith(".build")
                        || path.EndsWith(".html")
                        || path.EndsWith(".xaml")
                        || path.EndsWith(".gitignore")
                        || path.Contains(".nuget")
                        || path.EndsWith(".sln")
                        || path.EndsWith(".csproj")
                        || path.EndsWith(".suo")
                        || path.EndsWith(".build")
                        || path.EndsWith(".tmp")
                        || path.EndsWith(".json")
                        || path.EndsWith(".vsmdi")
                        || path.EndsWith(".testsettings")
                        || path.EndsWith(".svn")
                        || path.Contains(".git")
                        || path.Contains(".vs")
                        || path.Contains("layout"))
                {
                    continue;
                }

                var separator = new char[] { pathSeparator };
                var parts = path.Split(separator);
                ensureExists(oldParsed, parts, path);
            }
        }
        private async Task<List<TreeViewModel>> GetTree(string commit)
        {
            await AuthenticateGitHub();

            loadingPanel.SubMessage = "Carregando Arvore de Pastas... (Pode demorar um pouco dependendo do tamanho do projeto)";
            loadingPanel.IsLoading = true;

            CreateClient();
            var treeResponse = await _client.Git.Tree.GetRecursive(GitHubCredentials.GitOwner, GitHubCredentials.GitName, commit);
            var folders = treeResponse.Tree.Select(i => i.Path).ToList();

            var parsed = new TreeViewModel { Title = "/", Children = new List<TreeViewModel>(), FullPath = "/" };
            BuildTree(folders, parsed);

            PanelCloseCommand.Execute(null);

            return new List<TreeViewModel> { parsed };
        }