mirror of
https://github.com/git/git.git
synced 2026-08-03 06:31:08 +00: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
@@ -133,7 +133,7 @@ static void show_rev(int type, const struct object_id *oid, const char *name)
|
||||
struct object_id discard;
|
||||
char *full;
|
||||
|
||||
switch (dwim_ref(name, strlen(name), discard.hash, &full)) {
|
||||
switch (dwim_ref(name, strlen(name), &discard, &full)) {
|
||||
case 0:
|
||||
/*
|
||||
* Not found -- not a ref. We could
|
||||
|
||||
Reference in New Issue
Block a user