mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-06 15:42:20 +01:00
Fix duplicated diff issue in exporting patch feature(#2913)
This commit is contained in:
@@ -675,11 +675,10 @@ object JGitUtil {
|
||||
df.setDiffComparator(RawTextComparator.DEFAULT)
|
||||
df.setDetectRenames(true)
|
||||
getDiffEntries(git, from, to)
|
||||
.map { entry =>
|
||||
.foreach { entry =>
|
||||
df.format(entry)
|
||||
new String(out.toByteArray, "UTF-8")
|
||||
}
|
||||
.mkString("\n")
|
||||
new String(out.toByteArray, "UTF-8")
|
||||
}
|
||||
|
||||
private def getDiffEntries(git: Git, from: Option[String], to: String): Seq[DiffEntry] = {
|
||||
|
||||
Reference in New Issue
Block a user