From 45599ae86d33d2a681acb8723e01c9b42e4fd335 Mon Sep 17 00:00:00 2001 From: Christian Halstrick Date: Thu, 12 Apr 2018 08:39:29 +0200 Subject: Allow '@' as last character of ref Previously @ was allowed e.g. in branch names, but not as the last character. The case that @ is the last character was not handled. Change-Id: Ic33870b22236f7a5ec7b54007f1b0cefd9354bfb --- .../tst/org/eclipse/jgit/lib/RepositoryResolveTest.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'org.eclipse.jgit.test/tst/org') diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java index 1d2a4e9ab7..05b78ea195 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java @@ -324,6 +324,8 @@ public class RepositoryResolveTest extends SampleDataRepositoryTestCase { assertFalse(Repository.isValidRefName("x/a\\b")); assertFalse(Repository.isValidRefName("x/a\u0000")); + db.resolve("x/a@"); + assertUnparseable("."); assertUnparseable("x@{3"); assertUnparseable("x[b"); -- cgit v1.2.3