本文整理匯總了C#中NGit.Revwalk.RevCommit.Has方法的典型用法代碼示例。如果您正苦於以下問題:C# RevCommit.Has方法的具體用法?C# RevCommit.Has怎麽用?C# RevCommit.Has使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NGit.Revwalk.RevCommit
的用法示例。
在下文中一共展示了RevCommit.Has方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Add
/// <summary>Add a commit if it does not have a flag set yet, then set the flag.</summary>
/// <remarks>
/// Add a commit if it does not have a flag set yet, then set the flag.
/// <p>
/// This method permits the application to test if the commit has the given
/// flag; if it does not already have the flag than the commit is added to
/// the queue and the flag is set. This later will prevent the commit from
/// being added twice.
/// </remarks>
/// <param name="c">commit to add.</param>
/// <param name="queueControl">flag that controls admission to the queue.</param>
public void Add(RevCommit c, RevFlag queueControl)
{
if (!c.Has(queueControl))
{
c.Add(queueControl);
Add(c);
}
}
示例2: PushLocalCommit
/// <exception cref="NGit.Errors.MissingObjectException"></exception>
/// <exception cref="System.IO.IOException"></exception>
private void PushLocalCommit(RevCommit p)
{
if (p.Has(LOCALLY_SEEN))
{
return;
}
revWalk.ParseHeaders(p);
p.Add(LOCALLY_SEEN);
p.Add(COMPLETE);
p.Carry(COMPLETE);
localCommitQueue.Add(p);
}