Exemplo n.º 1
0
        private void UpdateCommitLabelDict(Branch[] branches)
        {
            _commitLabelDict.Values
                .SelectMany(x => x)
                .ForEach(x => x.Dispose());

            _commitLabelDict = new Dictionary<string, List<CommitLabel>>();

            branches.ForEach(b =>
            {
                if (_commitLabelDict.ContainsKey(b.TipSha) == false)
                    _commitLabelDict[b.TipSha] = new List<CommitLabel>();

                _commitLabelDict[b.TipSha].Add(
                    new CommitLabel
                    {
                        Name = b.Name,
                        Type = b.IsRemote ? CommitLabelType.RemoveBranch : CommitLabelType.LocalBranch
                    });
            });
        }
Exemplo n.º 2
0
 private void UpdateBranchProps(Branch[] branches)
 {
     branches.ForEach(x => x.UpdateProps());
 }