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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed May 6, 2017 at 22:09 UTC 9e31eafe7e98bab5013e598037e5581739fd4f42
1 file changed +3 -3
parse-options-cb.c
+3 -3
@@ -80,14 +80,14 @@ int parse_opt_verbosity_cb(const struct option *opt, const char *arg,
80
81 int parse_opt_commits(const struct option *opt, const char *arg, int unset)
82 {
83 - unsigned char sha1[20];
83 + struct object_id oid;
84 struct commit *commit;
85
86 if (!arg)
87 return -1;
88 - if (get_sha1(arg, sha1))
88 + if (get_oid(arg, &oid))
89 return error("malformed object name %s", arg);
90 - commit = lookup_commit_reference(sha1);
90 + commit = lookup_commit_reference(oid.hash);
91 if (!commit)
92 return error("no such commit %s", arg);
93 commit_list_insert(commit, opt->value);