From cca5fa6406046c19ab5a8117fe71bf4402c00d88 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sun, 15 Oct 2017 22:06:57 +0000 Subject: refs: convert dwim_ref and expand_ref to struct object_id All of the callers of these functions just pass the hash member of a struct object_id, so convert them to use a pointer to struct object_id directly. Insert a check for NULL in expand_ref on a temporary basis; this check can be removed when resolve_ref_unsafe is converted as well. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'branch.c') diff --git a/branch.c b/branch.c index 45029ea14..62f7b0d8c 100644 --- a/branch.c +++ b/branch.c @@ -264,7 +264,7 @@ void create_branch(const char *name, const char *start_name, die(_("Not a valid object name: '%s'."), start_name); } - switch (dwim_ref(start_name, strlen(start_name), oid.hash, &real_ref)) { + switch (dwim_ref(start_name, strlen(start_name), &oid, &real_ref)) { case 0: /* Not branching from any existing branch */ if (explicit_tracking) -- cgit v1.2.1