mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
(refs #970)Display permission change
This commit is contained in:
@@ -110,6 +110,8 @@ object JGitUtil {
|
||||
newIsImage: Boolean,
|
||||
oldObjectId: Option[String],
|
||||
newObjectId: Option[String],
|
||||
oldMode: String,
|
||||
newMode: String,
|
||||
tooLarge: Boolean
|
||||
)
|
||||
|
||||
@@ -515,6 +517,8 @@ object JGitUtil {
|
||||
newIsImage = newIsImage,
|
||||
oldObjectId = None,
|
||||
newObjectId = Option(treeWalk.getObjectId(0)).map(_.name),
|
||||
oldMode = treeWalk.getFileMode(0).toString,
|
||||
newMode = treeWalk.getFileMode(0).toString,
|
||||
tooLarge = false
|
||||
)
|
||||
} else {
|
||||
@@ -528,6 +532,8 @@ object JGitUtil {
|
||||
newIsImage = newIsImage,
|
||||
oldObjectId = None,
|
||||
newObjectId = Option(treeWalk.getObjectId(0)).map(_.name),
|
||||
oldMode = treeWalk.getFileMode(0).toString,
|
||||
newMode = treeWalk.getFileMode(0).toString,
|
||||
tooLarge = false
|
||||
)
|
||||
}))
|
||||
@@ -562,6 +568,8 @@ object JGitUtil {
|
||||
newIsImage = false,
|
||||
oldObjectId = Option(diff.getOldId).map(_.name),
|
||||
newObjectId = Option(diff.getNewId).map(_.name),
|
||||
oldMode = diff.getOldMode.toString,
|
||||
newMode = diff.getNewMode.toString,
|
||||
tooLarge = true
|
||||
)
|
||||
} else {
|
||||
@@ -578,6 +586,8 @@ object JGitUtil {
|
||||
newIsImage = newIsImage,
|
||||
oldObjectId = Option(diff.getOldId).map(_.name),
|
||||
newObjectId = Option(diff.getNewId).map(_.name),
|
||||
oldMode = diff.getOldMode.toString,
|
||||
newMode = diff.getNewMode.toString,
|
||||
tooLarge = false
|
||||
)
|
||||
} else {
|
||||
@@ -591,6 +601,8 @@ object JGitUtil {
|
||||
newIsImage = newIsImage,
|
||||
oldObjectId = Option(diff.getOldId).map(_.name),
|
||||
newObjectId = Option(diff.getNewId).map(_.name),
|
||||
oldMode = diff.getOldMode.toString,
|
||||
newMode = diff.getNewMode.toString,
|
||||
tooLarge = false
|
||||
)
|
||||
}
|
||||
|
||||
@@ -54,9 +54,8 @@
|
||||
<a href="@url(repository)/blob/@newCommitId.get/@diff.newPath" class="btn btn-default btn-sm" title="View the whole file at version @newCommitId.get.substring(0, 10)" data-toggle="tooltip">View</a>
|
||||
</div>
|
||||
}
|
||||
<span class="diffstat">
|
||||
<i class="octicon octicon-diff-renamed"></i>
|
||||
</span> @diff.oldPath -> @diff.newPath
|
||||
<span class="diffstat"><i class="octicon octicon-diff-renamed"></i></span>
|
||||
<span class="monospace">@diff.oldPath → @diff.newPath</span>
|
||||
}
|
||||
@if(diff.changeType == ChangeType.ADD || diff.changeType == ChangeType.MODIFY){
|
||||
@if(newCommitId.isDefined){
|
||||
@@ -73,7 +72,7 @@
|
||||
<i class="octicon octicon-diff-modified"></i>
|
||||
}
|
||||
</span>
|
||||
@diff.newPath
|
||||
<span class="monospace">@diff.newPath</span>
|
||||
}
|
||||
@if(diff.changeType == ChangeType.DELETE){
|
||||
@if(oldCommitId.isDefined){
|
||||
@@ -82,16 +81,22 @@
|
||||
<a href="@url(repository)/blob/@oldCommitId.get/@diff.oldPath" class="btn btn-default btn-sm" title="View the whole file at version @oldCommitId.get.substring(0, 10)" data-toggle="tooltip">View</a>
|
||||
</div>
|
||||
}
|
||||
<span class="diffstat">
|
||||
<i class="octicon octicon-diff-removed"></i>
|
||||
</span> @diff.oldPath
|
||||
<span class="diffstat"><i class="octicon octicon-diff-removed"></i></span>
|
||||
<span class="monospace">@diff.oldPath</span>
|
||||
}
|
||||
@if(diff.oldMode != diff.newMode){
|
||||
<span class="monospace">@diff.oldMode → @diff.newMode</span>
|
||||
}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0;">
|
||||
@if(diff.oldObjectId == diff.newObjectId){
|
||||
<div class="diff-same">File renamed without changes</div>
|
||||
@if(diff.oldPath != diff.newPath){
|
||||
<div class="diff-same">File renamed without changes</div>
|
||||
} else {
|
||||
<div class="diff-same">File mode changed</div>
|
||||
}
|
||||
} else {
|
||||
@if(diff.newContent != None || diff.oldContent != None){
|
||||
<div id="diffText-@i" class="diffText"></div>
|
||||
|
||||
Reference in New Issue
Block a user