From 529b2017dff2e0691f3bcdd677c85931724a0def Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sun, 10 Oct 2010 17:49:26 -0700 Subject: [PATCH] Fix three-word command names Command names like MakeCacheTree weren't coming up with hyphens between every word, so they read "debug-make-cachetree" rather than the expected "debug-make-cache-tree". On each lowercase character reset the lastWasDash flag so the next uppercase will insert a hyphen before the next word. Change-Id: I539fabb339e60896165619c307dec71e3317b0d8 Signed-off-by: Shawn O. Pearce Signed-off-by: Matthias Sohn --- org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java index eace2e1f2..d76a59b60 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java @@ -93,6 +93,7 @@ public class CommandRef { s.append(Character.toLowerCase(c)); } else { s.append(c); + lastWasDash = false; } } return s.toString();