summaryrefslogtreecommitdiff
path: root/builtin/rev-parse.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:06:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-16 02:05:51 (GMT)
commitcca5fa6406046c19ab5a8117fe71bf4402c00d88 (patch)
treeb7305cc09752a86366cb4695cd504adec207e022 /builtin/rev-parse.c
parent34c290a6fc8b1f6705d2646d726df2260927da0f (diff)
downloadgit-cca5fa6406046c19ab5a8117fe71bf4402c00d88.zip
git-cca5fa6406046c19ab5a8117fe71bf4402c00d88.tar.gz
git-cca5fa6406046c19ab5a8117fe71bf4402c00d88.tar.bz2
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/rev-parse.c')
-rw-r--r--builtin/rev-parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index a8d7e6f..74aa644 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -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