]> source.dussan.org Git - jgit.git/commit
Support refspecs with wildcard in middle (not only at end) 81/12681/4
authorRobin Stocker <robin@nibor.org>
Sat, 4 May 2013 14:43:51 +0000 (16:43 +0200)
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>
Tue, 28 May 2013 09:33:03 +0000 (05:33 -0400)
commita51899c2036984fa7a04290ca1364a02af34f95a
treea33c778e7e5345e813e3c905f9685033938fac7e
parentec97912762754ee88f1af5ed80e993c545778242
Support refspecs with wildcard in middle (not only at end)

The following refspec, which can be used to fetch GitHub pull requests,
is supported by C Git but was not yet by JGit:

  +refs/pull/*/head:refs/remotes/origin/pr/*

The reason is that the wildcard in the source is in the middle.

This change also includes more validation (e.g. "refs//heads" is not
valid) and test cases.

Bug: 405099
Change-Id: I9bcef7785a0762ed0a98ca95a0bdf8879d5702aa
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RefSpecTest.java
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java