@(diffs: Seq[util.JGitUtil.DiffInfo], repository: service.RepositoryService.RepositoryInfo, commitId: Option[String])(implicit context: app.Context) @import context._ @import view.helpers._ @import org.eclipse.jgit.diff.DiffEntry.ChangeType @diffs.zipWithIndex.map { case (diff, i) =>

@if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ @diff.oldPath -> @diff.newPath } @if(diff.changeType == ChangeType.ADD || diff.changeType == ChangeType.MODIFY){ @diff.newPath } @if(diff.changeType == ChangeType.DELETE){ @diff.oldPath } @if(commitId.isDefined){ View file @@ @commitId.get.substring(0, 10) }
@if(diff.newContent != None || diff.oldContent != None){ @diff.newContent.getOrElse("") @diff.oldContent.getOrElse("") } else { Not supported }

}