refs: loosen over-strict "format" check
commitada4ec627f204697a8bcbed89dc150aa3f0e51af
authorJunio C Hamano <gitster@pobox.com>
Thu, 17 Nov 2011 00:54:32 +0000 (16 16:54 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Nov 2011 04:53:16 +0000 (16 20:53 -0800)
treeda46fe0a24ec66edfe4776dce767678d7d4f7426
parent973592ca53225b2957e548b5b728940d5d5eca99
refs: loosen over-strict "format" check

The add_extra_ref() interface is used to add an extra-ref that is _not_
our ref for the purpose of helping auto-following of tags and reducing
object transfer from remote repository, and they are typically formatted
as a tagname followed by ^{} to make sure no valid refs match that
pattern. In other words, these entries are deliberately formatted not to
pass check-refname-format test.

A recent series however added a test unconditionally to the add_ref()
function that is called from add_extra_ref(). The check may be sensible
for other two callsites of the add_ref() interface, but definitely is
a wrong thing to do in add_extra_ref(). Disable it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
t/t5700-clone-reference.sh