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>
This commit is contained in:
committed by
Junio C Hamano
parent
34c290a6fc
commit
cca5fa6406
@ -454,7 +454,7 @@ static void merge_name(const char *remote, struct strbuf *msg)
|
||||
if (!remote_head)
|
||||
die(_("'%s' does not point to a commit"), remote);
|
||||
|
||||
if (dwim_ref(remote, strlen(remote), branch_head.hash, &found_ref) > 0) {
|
||||
if (dwim_ref(remote, strlen(remote), &branch_head, &found_ref) > 0) {
|
||||
if (starts_with(found_ref, "refs/heads/")) {
|
||||
strbuf_addf(msg, "%s\t\tbranch '%s' of .\n",
|
||||
oid_to_hex(&branch_head), remote);
|
||||
|
||||
Reference in New Issue
Block a user