void CheckBranch()
        {
            string name = Repository?.Head.CanonicalName;

            if (CheckoutedBranch != name)
            {
                BranchChanged?.Invoke();
            }
            BranchUpdated?.Invoke();

            CheckoutedBranch = name != "(no branch)" ? name : null;
        }
Exemple #2
0
 public void RaisesBranchChangedEvent() =>
 BranchChanged.Should().Contain(args => args.Branch.Name == "master" &&
                                args.Renamed.Any(item => item.Key == "subdir\\key" &&
                                                 item.OldKey == "key" &&
                                                 item.GetValue() == "value" &&
                                                 item.GetOldValue() == "value"));
Exemple #3
0
 public void RaisesBranchChangedEvent() =>
 BranchChanged.Should().Contain(args => args.Branch.Name == "master" &&
                                args.Deleted.Any(item => item.Key == "key"));