예제 #1
0
        public virtual void TestHasAllFlag()
        {
            RevCommit  a     = Commit();
            RevFlag    flag1 = rw.NewFlag("flag1");
            RevFlag    flag2 = rw.NewFlag("flag2");
            RevFlagSet s     = new RevFlagSet();

            s.AddItem(flag1);
            s.AddItem(flag2);
            NUnit.Framework.Assert.IsFalse(a.HasAll(s));
            a.flags |= flag1.mask;
            NUnit.Framework.Assert.IsFalse(a.HasAll(s));
            a.flags |= flag2.mask;
            NUnit.Framework.Assert.IsTrue(a.HasAll(s));
        }
예제 #2
0
			/// <exception cref="NGit.Errors.MissingObjectException"></exception>
			/// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception>
			/// <exception cref="System.IO.IOException"></exception>
			public override bool Include(RevWalk walker, RevCommit c)
			{
				return c.HasAll(flags);
			}