Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
parse-options-cb: convert sha1_array_append caller to struct object_id
author
brian m. carlson
<sandals@crustytoothpaste.net>
Sun, 26 Mar 2017 16:01:31 +0000
(16:01 +0000)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 28 Mar 2017 16:59:33 +0000
(09:59 -0700)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options-cb.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
365c27f
)
diff --git
a/parse-options-cb.c
b/parse-options-cb.c
index b7d8f7dcb2c3ae7568542832accadab84c7ae314..40ece4d8c21b2b2bd399c19edc5d106d188f94a5 100644
(file)
--- a/
parse-options-cb.c
+++ b/
parse-options-cb.c
@@
-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;
}