mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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
@@ -1449,7 +1449,7 @@ static void wt_status_get_detached_from(struct wt_status_state *state)
|
||||
return;
|
||||
}
|
||||
|
||||
if (dwim_ref(cb.buf.buf, cb.buf.len, oid.hash, &ref) == 1 &&
|
||||
if (dwim_ref(cb.buf.buf, cb.buf.len, &oid, &ref) == 1 &&
|
||||
/* sha1 is a commit? match without further lookup */
|
||||
(!oidcmp(&cb.noid, &oid) ||
|
||||
/* perhaps sha1 is a tag, try to dereference to a commit */
|
||||
|
||||
Reference in New Issue
Block a user