Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-03-12 05:27:54 +0300
committerJunio C Hamano <gitster@pobox.com>2018-03-14 19:23:50 +0300
commitb383a13cc0dbed752b69d7ad249bc857b9d3607b (patch)
treeab9434ad4444be32900ba7fa76211124a9f4a4cd /builtin/mktag.c
parentb4f5aca40e6f77cbabcbf4ff003c3cf30a1830c8 (diff)
Convert lookup_replace_object to struct object_id
Convert both the argument and the return value to be pointers to struct object_id. Update the callers and their internals to deal with the new type. Remove several temporaries which are no longer needed. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/mktag.c')
-rw-r--r--builtin/mktag.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/builtin/mktag.c b/builtin/mktag.c
index cfb777b3c8..9f5a50a8fd 100644
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
@@ -24,14 +24,11 @@ static int verify_object(const struct object_id *oid, const char *expected_type)
enum object_type type;
unsigned long size;
void *buffer = read_object_file(oid, &type, &size);
- const unsigned char *repl = lookup_replace_object(oid->hash);
+ const struct object_id *repl = lookup_replace_object(oid);
if (buffer) {
- struct object_id reploid;
- hashcpy(reploid.hash, repl);
-
if (type == type_from_string(expected_type))
- ret = check_object_signature(&reploid, buffer, size, expected_type);
+ ret = check_object_signature(repl, buffer, size, expected_type);
free(buffer);
}
return ret;