]> source.dussan.org Git - jgit.git/commit
RefSpec: reject refs ending in '/' 33/77733/5
authorStefan Beller <sbeller@google.com>
Thu, 21 Jul 2016 21:21:57 +0000 (14:21 -0700)
committerStefan Beller <sbeller@google.com>
Mon, 25 Jul 2016 17:10:06 +0000 (10:10 -0700)
commit1556ca740b75661a2670ddcb581dafced3010bae
treef09627ad7abe0476e43349be81400b35dd7af33c
parente9e2f7e6b5c075518bb4a744513558956dd099bf
RefSpec: reject refs ending in '/'

We had a case in Gerrits superproject subscriptions where
'refs/heads/' was configured with the intention to mean 'refs/heads/*'.

The first expression lacks the '*', which is why it is not considered
a wildcard but it was considered valid and so was not found early to be
a typo.

Refs are not allowed to end with '/' anyway, so add a check for that.

Change-Id: I3ffdd9002146382acafb4fbc310a64af4cc1b7a9
Signed-off-by: Stefan Beller <sbeller@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RefSpecTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java