summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:06:57 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-16 11:05:51 +0900
commitcca5fa6406046c19ab5a8117fe71bf4402c00d88 (patch)
treeb7305cc09752a86366cb4695cd504adec207e022 /builtin/log.c
parentrefs: convert read_ref and read_ref_full to object_id (diff)
downloadtgif-cca5fa6406046c19ab5a8117fe71bf4402c00d88.tar.xz
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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c
index d81a09051e..ba9d4cd786 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -975,7 +975,7 @@ static char *find_branch_name(struct rev_info *rev)
return NULL;
ref = rev->cmdline.rev[positive].name;
tip_oid = &rev->cmdline.rev[positive].item->oid;
- if (dwim_ref(ref, strlen(ref), branch_oid.hash, &full_ref) &&
+ if (dwim_ref(ref, strlen(ref), &branch_oid, &full_ref) &&
skip_prefix(full_ref, "refs/heads/", &v) &&
!oidcmp(tip_oid, &branch_oid))
branch = xstrdup(v);