本文整理汇总了C#中NGit.GetNewPath方法的典型用法代码示例。如果您正苦于以下问题:C# NGit.GetNewPath方法的具体用法?C# NGit.GetNewPath怎么用?C# NGit.GetNewPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NGit
的用法示例。
在下文中一共展示了NGit.GetNewPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BreakModify
/// <summary>Breaks apart a DiffEntry into two entries, one DELETE and one ADD.</summary>
/// <remarks>Breaks apart a DiffEntry into two entries, one DELETE and one ADD.</remarks>
/// <param name="entry">the DiffEntry to break apart.</param>
/// <returns>
/// a list containing two entries. Calling
/// <see cref="GetChangeType()">GetChangeType()</see>
/// on the first entry will return ChangeType.DELETE. Calling it on
/// the second entry will return ChangeType.ADD.
/// </returns>
internal static IList<NGit.Diff.DiffEntry> BreakModify(NGit.Diff.DiffEntry entry)
{
NGit.Diff.DiffEntry del = new NGit.Diff.DiffEntry();
del.oldId = entry.GetOldId();
del.oldMode = entry.GetOldMode();
del.oldPath = entry.GetOldPath();
del.newId = A_ZERO;
del.newMode = FileMode.MISSING;
del.newPath = NGit.Diff.DiffEntry.DEV_NULL;
del.changeType = DiffEntry.ChangeType.DELETE;
NGit.Diff.DiffEntry add = new NGit.Diff.DiffEntry();
add.oldId = A_ZERO;
add.oldMode = FileMode.MISSING;
add.oldPath = NGit.Diff.DiffEntry.DEV_NULL;
add.newId = entry.GetNewId();
add.newMode = entry.GetNewMode();
add.newPath = entry.GetNewPath();
add.changeType = DiffEntry.ChangeType.ADD;
return Arrays.AsList(del, add);
}