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:
parent
365c27fbff
commit
9e1d7087dc
@ -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)
|
||||
{
|
||||
unsigned char sha1[20];
|
||||
struct object_id oid;
|
||||
|
||||
if (unset) {
|
||||
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)
|
||||
return -1;
|
||||
if (get_sha1(arg, sha1))
|
||||
if (get_oid(arg, &oid))
|
||||
return error(_("malformed object name '%s'"), arg);
|
||||
sha1_array_append(opt->value, sha1);
|
||||
sha1_array_append(opt->value, oid.hash);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user