Commit 553fbd64 by Carlos Martín Nieto Committed by Vicent Marti

Check for looser reference names

res/dummy/a and refs/stash must pass. The other rules are already
tested by the rest of the checks.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
parent 83c95128
......@@ -691,7 +691,8 @@ BEGIN_TEST(normalize0, "normalize a direct (OID) reference name")
must_fail(ensure_refname_normalized(OID_REF, "refs/heads/a/", NULL));
must_fail(ensure_refname_normalized(OID_REF, "refs/heads/a.", NULL));
must_fail(ensure_refname_normalized(OID_REF, "refs/heads/a.lock", NULL));
must_fail(ensure_refname_normalized(OID_REF, "refs/dummy/a", NULL));
must_pass(ensure_refname_normalized(OID_REF, "refs/dummy/a", NULL));
must_pass(ensure_refname_normalized(OID_REF, "refs/stash", NULL));
must_pass(ensure_refname_normalized(OID_REF, "refs/tags/a", "refs/tags/a"));
must_pass(ensure_refname_normalized(OID_REF, "refs/heads/a/b", "refs/heads/a/b"));
must_pass(ensure_refname_normalized(OID_REF, "refs/heads/a./b", "refs/heads/a./b"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment