@(diffs: Seq[gitbucket.core.util.JGitUtil.DiffInfo], repository: gitbucket.core.service.RepositoryService.RepositoryInfo, newCommitId: Option[String], oldCommitId: Option[String], showIndex: Boolean, issueId: Option[Int], hasWritePermission: Boolean, showLineNotes: Boolean)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @import org.eclipse.jgit.diff.DiffEntry.ChangeType @if(showIndex){
@if(oldCommitId.isEmpty && newCommitId.isDefined) { Patch } @if(oldCommitId.isDefined && newCommitId.isDefined) { Patch }
Unified Split
Showing @diffs.size changed @helpers.plural(diffs.size, "file")

@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.newPath } @if(diff.changeType == ChangeType.MODIFY){ @diff.newPath } @if(diff.changeType == ChangeType.DELETE){ @diff.oldPath }
}

} @diffs.zipWithIndex.map { case (diff, i) =>

@if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ @if(newCommitId.isDefined){
Ignore Space Show notes View
} @diff.oldPath → @diff.newPath } @if(diff.changeType == ChangeType.ADD || diff.changeType == ChangeType.MODIFY){ @if(newCommitId.isDefined){
Ignore Space Show notes View
} @if(diff.changeType == ChangeType.ADD){ } else { } @diff.newPath } @if(diff.changeType == ChangeType.DELETE){ @if(oldCommitId.isDefined){
Show notes View
} @diff.oldPath } @if(diff.oldMode != diff.newMode){ @diff.oldMode → @diff.newMode }

@if(diff.oldObjectId == diff.newObjectId){ @if(diff.oldPath != diff.newPath){
File renamed without changes
} else {
File mode changed
} } else { @if(diff.newContent != None || diff.oldContent != None){
} else { @if(diff.newIsImage || diff.oldIsImage){
@if(oldCommitId.isDefined && diff.oldIsImage){
} else { @if(diff.changeType != ChangeType.ADD){
Not supported
} } @if(newCommitId.isDefined && diff.newIsImage){
} else { @if(diff.changeType != ChangeType.DELETE){
Not supported
} }
} else { @if(diff.tooLarge){
Too large
} else {
Not supported
} } } }

}