From: brian m. carlson Date: Sat, 6 May 2017 22:09:59 +0000 (+0000) Subject: parse-options-cb: convert to struct object_id X-Git-Tag: v2.14.0-rc0~166^2~39 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9e31eafe7e98bab5013e598037e5581739fd4f42 parse-options-cb: convert to struct object_id This is a caller of lookup_commit_reference, which we will soon convert. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- diff --git a/parse-options-cb.c b/parse-options-cb.c index 7419780a9b..35a941fddc 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -80,14 +80,14 @@ int parse_opt_verbosity_cb(const struct option *opt, const char *arg, int parse_opt_commits(const struct option *opt, const char *arg, int unset) { - unsigned char sha1[20]; + struct object_id oid; struct commit *commit; if (!arg) return -1; - if (get_sha1(arg, sha1)) + if (get_oid(arg, &oid)) return error("malformed object name %s", arg); - commit = lookup_commit_reference(sha1); + commit = lookup_commit_reference(oid.hash); if (!commit) return error("no such commit %s", arg); commit_list_insert(commit, opt->value);