parse-options-cb: convert sha1_array_append caller to struct object_id

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson 2017-03-26 16:01:31 +00:00 committed by Junio C Hamano
parent 365c27fbff
commit 9e1d7087dc

View File

@ -96,7 +96,7 @@ int parse_opt_commits(const struct option *opt, const char *arg, int unset)
int parse_opt_object_name(const struct option *opt, const char *arg, int unset) int parse_opt_object_name(const struct option *opt, const char *arg, int unset)
{ {
unsigned char sha1[20]; struct object_id oid;
if (unset) { if (unset) {
sha1_array_clear(opt->value); sha1_array_clear(opt->value);
@ -104,9 +104,9 @@ int parse_opt_object_name(const struct option *opt, const char *arg, int unset)
} }
if (!arg) if (!arg)
return -1; return -1;
if (get_sha1(arg, sha1)) if (get_oid(arg, &oid))
return error(_("malformed object name '%s'"), arg); return error(_("malformed object name '%s'"), arg);
sha1_array_append(opt->value, sha1); sha1_array_append(opt->value, oid.hash);
return 0; return 0;
} }