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 --- upload-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upload-pack.c') diff --git a/upload-pack.c b/upload-pack.c index e25f725c0f..030eba5a0c 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -787,7 +787,7 @@ static void receive_needs(void) if (skip_prefix(line, "deepen-not ", &arg)) { char *ref = NULL; struct object_id oid; - if (expand_ref(arg, strlen(arg), oid.hash, &ref) != 1) + if (expand_ref(arg, strlen(arg), &oid, &ref) != 1) die("git upload-pack: ambiguous deepen-not: %s", line); string_list_append(&deepen_not, ref); free(ref); -- cgit v1.2.3