本文整理汇总了Java中org.eclipse.jgit.transport.ReceiveCommand.Type方法的典型用法代码示例。如果您正苦于以下问题:Java ReceiveCommand.Type方法的具体用法?Java ReceiveCommand.Type怎么用?Java ReceiveCommand.Type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jgit.transport.ReceiveCommand
的用法示例。
在下文中一共展示了ReceiveCommand.Type方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fire
import org.eclipse.jgit.transport.ReceiveCommand; //导入方法依赖的package包/类
private void fire(
Project.NameKey project,
String ref,
ObjectId oldObjectId,
ObjectId newObjectId,
ReceiveCommand.Type type,
AccountInfo updater) {
if (!listeners.iterator().hasNext()) {
return;
}
ObjectId o = oldObjectId != null ? oldObjectId : ObjectId.zeroId();
ObjectId n = newObjectId != null ? newObjectId : ObjectId.zeroId();
Event event = new Event(project, ref, o.name(), n.name(), type, updater);
for (GitReferenceUpdatedListener l : listeners) {
try {
l.onGitReferenceUpdated(event);
} catch (Exception e) {
util.logEventListenerError(this, l, e);
}
}
}
示例2: Event
import org.eclipse.jgit.transport.ReceiveCommand; //导入方法依赖的package包/类
Event(
Project.NameKey project,
String ref,
String oldObjectId,
String newObjectId,
ReceiveCommand.Type type,
AccountInfo updater) {
this.projectName = project.get();
this.ref = ref;
this.oldObjectId = oldObjectId;
this.newObjectId = newObjectId;
this.type = type;
this.updater = updater;
}
示例3: getCommand
import org.eclipse.jgit.transport.ReceiveCommand; //导入方法依赖的package包/类
public static ReceiveCommand getCommand(RefUpdate update, ReceiveCommand.Type type) {
return new ReceiveCommand(
update.getExpectedOldObjectId(), update.getNewObjectId(), update.getName(), type);
}