aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
index 1e6fb780b2..a47b73dc34 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
@@ -187,6 +187,13 @@ public class FileHeader extends DiffEntry {
return getScriptText(new Charset[] { oldCharset, newCharset });
}
+ /**
+ * Convert the patch script for this file into a string.
+ *
+ * @param charsetGuess
+ * hint which charset is used
+ * @return the patch script, as a Unicode string.
+ */
String getScriptText(Charset[] charsetGuess) {
if (getHunks().isEmpty()) {
// If we have no hunks then we can safely assume the entire