summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2011-10-27 22:55:59 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2011-10-27 22:55:59 +0200
commita5f72d6b3bb0d2263c4b20ebf2ef35ef0a20ee9c (patch)
tree6dd90f1be971dc1423159f0216485d1f3b9d7e38 /org.eclipse.jgit
parentb6281cac01858b93b856b80d80c4dd4b915f0502 (diff)
downloadjgit-a5f72d6b3bb0d2263c4b20ebf2ef35ef0a20ee9c.tar.gz
jgit-a5f72d6b3bb0d2263c4b20ebf2ef35ef0a20ee9c.zip
Implement Config.Entry.toString() to help debugging
Change-Id: I86f6359d955d39ab033848b87ed39d20378d3c1f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
index 77ab150c6d..8359997202 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -1414,6 +1414,7 @@ public class Config {
* The configuration file entry
*/
private static class Entry {
+
/**
* The text content before entry
*/
@@ -1482,6 +1483,20 @@ public class Config {
return false;
return a.equals(b);
}
+
+ @Override
+ public String toString() {
+ if (section == null)
+ return "<empty>";
+ StringBuilder b = new StringBuilder(section);
+ if (subsection != null)
+ b.append(".").append(subsection);
+ if (name != null)
+ b.append(".").append(name);
+ if (value != null)
+ b.append("=").append(value);
+ return b.toString();
+ }
}
private static class StringReader {