diff options
author | Stefan Beller <sbeller@google.com> | 2016-07-28 11:29:38 -0700 |
---|---|---|
committer | Stefan Beller <sbeller@google.com> | 2016-07-28 11:29:38 -0700 |
commit | 647bf67f8d452c7f7e41a7aa5ab515e29af7a435 (patch) | |
tree | b11ebf57f2b8f4abb3a6582abe592bf2cc5d97aa | |
parent | b8d861bfd5f7d63be0244e2339378533329ef964 (diff) | |
download | jgit-647bf67f8d452c7f7e41a7aa5ab515e29af7a435.tar.gz jgit-647bf67f8d452c7f7e41a7aa5ab515e29af7a435.zip |
RefSpec: Make WildcardMode public
We have to be able to access the enum from outside the package as part of
the API.
Change-Id: I4bdc6bd53a14237c5f4fb9397ae850f9a24c4cfb
Signed-off-by: Stefan Beller <sbeller@google.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java index aa0118e399..1440b83cf7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java @@ -82,8 +82,26 @@ public class RefSpec implements Serializable { /** Is this specification actually a wildcard match? */ private boolean wildcard; - enum WildcardMode { - REQUIRE_MATCH, ALLOW_MISMATCH + /** + * How strict to be about wildcards. + * + * @since 4.5 + */ + public enum WildcardMode { + /** + * Reject refspecs with an asterisk on the source side and not the + * destination side or vice versa. This is the mode used by FetchCommand + * and PushCommand to create a one-to-one mapping between source and + * destination refs. + */ + REQUIRE_MATCH, + /** + * Allow refspecs with an asterisk on only one side. This can create a + * many-to-one mapping between source and destination refs, so + * expandFromSource and expandFromDestination are not usable in this + * mode. + */ + ALLOW_MISMATCH } /** Whether a wildcard is allowed on one side but not the other. */ private WildcardMode allowMismatchedWildcards; |