本文整理汇总了C#中RevCommit类的典型用法代码示例。如果您正苦于以下问题:C# RevCommit类的具体用法?C# RevCommit怎么用?C# RevCommit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RevCommit类属于命名空间,在下文中一共展示了RevCommit类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TextFor
private static string TextFor(RevCommit cmit)
{
byte[] raw = cmit.RawBuffer;
int b = RawParseUtils.author(raw, 0);
if (b < 0) return string.Empty;
int e = RawParseUtils.nextLF(raw, b, (byte)'>');
return Constants.CHARSET.GetString(raw, b, e);
}
示例2: textFor
public static RawCharSequence textFor(RevCommit cmit)
{
byte[] raw = cmit.getRawBuffer();
int b = RawParseUtils.committer(raw, 0);
if (b < 0)
return RawCharSequence.EMPTY;
int e = RawParseUtils.nextLF(raw, b, (byte)'>');
return new RawCharSequence(raw, b, e);
}
示例3: TextFor
private static string TextFor(RevCommit cmit)
{
byte[] raw = cmit.RawBuffer;
int b = RawParseUtils.commitMessage(raw, 0);
if (b < 0)
{
return string.Empty;
}
return Constants.CHARSET.GetString(raw, b, raw.Length);
}
示例4: text
/**
* Obtain the raw text to match against.
*
* @param cmit
* current commit being evaluated.
* @return sequence for the commit's content that we need to match on.
*/
internal abstract string text(RevCommit cmit);
示例5: rewrite
private RevCommit rewrite(RevCommit p)
{
for (; ; )
{
RevCommit[] pList = p.parents;
if (pList.Length > 1)
{
// This parent is a merge, so keep it.
//
return p;
}
if ((p.flags & RevWalk.UNINTERESTING) != 0)
{
// Retain uninteresting parents. They show where the
// DAG was cut off because it wasn't interesting.
//
return p;
}
if ((p.flags & REWRITE) == 0)
{
// This parent was not eligible for rewriting. We
// need to keep it in the DAG.
//
return p;
}
if (pList.Length == 0)
{
// We can't go back any further, other than to
// just delete the parent entirely.
//
return null;
}
p = pList[0];
}
}
示例6: include
public override bool include(RevWalk walker, RevCommit cmit)
{
// Since the walker sorts commits by commit time we can be
// reasonably certain there is nothing remaining worth our
// scanning if this commit is before the point in question.
//
if (cmit.CommitTime < _when)
{
throw StopWalkException.INSTANCE;
}
return true;
}
示例7: add
public void add(RevCommit c)
{
commits[tailIndex++] = c;
}
示例8: include
public override bool include(RevWalk walker, RevCommit cmit)
{
return _compiledPattern.IsMatch(text(cmit));
}
示例9: include
public override bool include(RevWalk walker, RevCommit c)
{
return true;
}
示例10: include
public override bool include(RevWalk walker, RevCommit cmit)
{
return false;
}
示例11: text
internal override string text(RevCommit cmit)
{
return textFor(cmit).ToString();
}
示例12: unpop
public void unpop(RevCommit c)
{
_commits[--HeadIndex] = c;
}
示例13: add
public void add(RevCommit c)
{
_commits[TailIndex++] = c;
}
示例14: include
public override bool include(RevWalk walker, RevCommit cmit)
{
return cmit.hasAll(_flags);
}
示例15: include
public override bool include(RevWalk walker, RevCommit c)
{
return c.hasAny(flags);
}