[EGIT PATCH 06/31] Make wildcard checking public in RefSpec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This constant and method can/should be reused in GUI.

Signed-off-by: Marek Zawirski <marek.zawirski@xxxxxxxxx>
---
 .../src/org/spearce/jgit/transport/RefSpec.java    |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/RefSpec.java b/org.spearce.jgit/src/org/spearce/jgit/transport/RefSpec.java
index e489233..9ec5847 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/RefSpec.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/RefSpec.java
@@ -47,9 +47,20 @@ import org.spearce.jgit.lib.Ref;
  * reference in one repository to another reference in another repository.
  */
 public class RefSpec {
-	private static final String WILDCARD_SUFFIX = "/*";
+	/**
+	 * Suffix for wildcard ref spec component, that indicate matching all refs
+	 * with specified prefix.
+	 */
+	public static final String WILDCARD_SUFFIX = "/*";
 
-	private static boolean isWildcard(final String s) {
+	/**
+	 * Check whether provided string is a wildcard ref spec component.
+	 * 
+	 * @param s
+	 *            ref spec component - string to test. Can be null.
+	 * @return true if provided string is a wildcard ref spec component.
+	 */
+	public static boolean isWildcard(final String s) {
 		return s != null && s.endsWith(WILDCARD_SUFFIX);
 	}
 
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux