本文整理汇总了C#中NGit.Revwalk.RevCommit.Add方法的典型用法代码示例。如果您正苦于以下问题:C# RevCommit.Add方法的具体用法?C# RevCommit.Add怎么用?C# RevCommit.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NGit.Revwalk.RevCommit
的用法示例。
在下文中一共展示了RevCommit.Add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: 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);
}
}