summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorEdwin Kempin2013-03-15 05:24:58 (EDT)
committer Edwin Kempin2013-03-15 05:24:58 (EDT)
commiteac218b7b4f71ff5d5715105288857b34f6bc07e (patch)
tree55e3ab6b57ae8ab1d2afbbfa7e8f750006005b6f
parent8e2a24a3b636d22a973e89763b5dbf11ec0d6821 (diff)
downloadjgit-eac218b7b4f71ff5d5715105288857b34f6bc07e.zip
jgit-eac218b7b4f71ff5d5715105288857b34f6bc07e.tar.gz
jgit-eac218b7b4f71ff5d5715105288857b34f6bc07e.tar.bz2
Add toString() for PackConfigrefs/changes/87/11187/1
This is helpful for writing the pack configuration into a log file. Change-Id: I5e7f5ff7e01c9538ca12a1860844ba9b467bdf05 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
index 7184859..ec17060 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
@@ -685,4 +685,22 @@ public class PackConfig {
"pack", "deltacompression", isDeltaCompress())); //$NON-NLS-1$ //$NON-NLS-2$
setBuildBitmaps(rc.getBoolean("pack", "buildbitmaps", isBuildBitmaps())); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+ public String toString() {
+ final StringBuilder b = new StringBuilder();
+ b.append("maxDeltaDepth=").append(getMaxDeltaDepth()); //$NON-NLS-1$
+ b.append("deltaSearchWindowSize=").append(getDeltaSearchWindowSize()); //$NON-NLS-1$
+ b.append("deltaSearchMemoryLimit=").append(getDeltaSearchMemoryLimit()); //$NON-NLS-1$
+ b.append("deltaCacheSize=").append(getDeltaCacheSize()); //$NON-NLS-1$
+ b.append("deltaCacheLimit=").append(getDeltaCacheLimit()); //$NON-NLS-1$
+ b.append("compressionLevel=").append(getCompressionLevel()); //$NON-NLS-1$
+ b.append("indexVersion=").append(getIndexVersion()); //$NON-NLS-1$
+ b.append("bigFileThreshold=").append(getBigFileThreshold()); //$NON-NLS-1$
+ b.append("threads=").append(getThreads()); //$NON-NLS-1$
+ b.append("reuseDeltas=").append(isReuseDeltas()); //$NON-NLS-1$
+ b.append("reuseObjects=").append(isReuseObjects()); //$NON-NLS-1$
+ b.append("deltaCompress=").append(isDeltaCompress()); //$NON-NLS-1$
+ b.append("buildBitmaps=").append(isBuildBitmaps()); //$NON-NLS-1$
+ return b.toString();
+ }
}