create_ref_entry(): remove check_name option
Only one caller was using it, so move the check to that caller. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
0a0865b8f1
commit
c1da06c6f1
@ -32,14 +32,10 @@ struct ref_dir *get_ref_dir(struct ref_entry *entry)
|
||||
}
|
||||
|
||||
struct ref_entry *create_ref_entry(const char *refname,
|
||||
const struct object_id *oid, int flag,
|
||||
int check_name)
|
||||
const struct object_id *oid, int flag)
|
||||
{
|
||||
struct ref_entry *ref;
|
||||
|
||||
if (check_name &&
|
||||
check_refname_format(refname, REFNAME_ALLOW_ONELEVEL))
|
||||
die("Reference has invalid format: '%s'", refname);
|
||||
FLEX_ALLOC_STR(ref, name, refname);
|
||||
oidcpy(&ref->u.value.oid, oid);
|
||||
oidclr(&ref->u.value.peeled);
|
||||
|
||||
Reference in New Issue
Block a user