summaryrefslogtreecommitdiff
path: root/tag.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-07-13 00:44:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-13 19:02:48 (GMT)
commit84571760ca96d244e4fff06819fab119947d792e (patch)
tree1f0c00d46652b0e5f503a1dbbbf49132c158e9da /tag.c
parent8b65a34c4a12cdaae7f43f65f760da0f48ad67e3 (diff)
downloadgit-84571760ca96d244e4fff06819fab119947d792e.zip
git-84571760ca96d244e4fff06819fab119947d792e.tar.gz
git-84571760ca96d244e4fff06819fab119947d792e.tar.bz2
tag: convert gpg_verify_tag to use struct object_id
Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tag.c b/tag.c
index 47f60ae..7e10acf 100644
--- a/tag.c
+++ b/tag.c
@@ -33,7 +33,7 @@ static int run_gpg_verify(const char *buf, unsigned long size, unsigned flags)
return ret;
}
-int gpg_verify_tag(const unsigned char *sha1, const char *name_to_report,
+int gpg_verify_tag(const struct object_id *oid, const char *name_to_report,
unsigned flags)
{
enum object_type type;
@@ -41,20 +41,20 @@ int gpg_verify_tag(const unsigned char *sha1, const char *name_to_report,
unsigned long size;
int ret;
- type = sha1_object_info(sha1, NULL);
+ type = sha1_object_info(oid->hash, NULL);
if (type != OBJ_TAG)
return error("%s: cannot verify a non-tag object of type %s.",
name_to_report ?
name_to_report :
- find_unique_abbrev(sha1, DEFAULT_ABBREV),
+ find_unique_abbrev(oid->hash, DEFAULT_ABBREV),
typename(type));
- buf = read_sha1_file(sha1, &type, &size);
+ buf = read_sha1_file(oid->hash, &type, &size);
if (!buf)
return error("%s: unable to read file.",
name_to_report ?
name_to_report :
- find_unique_abbrev(sha1, DEFAULT_ABBREV));
+ find_unique_abbrev(oid->hash, DEFAULT_ABBREV));
ret = run_gpg_verify(buf, size, flags);