summaryrefslogtreecommitdiff
path: root/builtin/cat-file.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-03-31 01:39:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-31 15:33:55 (GMT)
commit1b7ba794d21836f72e5888db63ab790077c04e1b (patch)
tree7b320b3ab15ac6a85e499619bbfbad3d02c00e69 /builtin/cat-file.c
parent5d3206d5010423b3bbf479e32567d0fddc7095e0 (diff)
downloadgit-1b7ba794d21836f72e5888db63ab790077c04e1b.zip
git-1b7ba794d21836f72e5888db63ab790077c04e1b.tar.gz
git-1b7ba794d21836f72e5888db63ab790077c04e1b.tar.bz2
Convert sha1_array_for_each_unique and for_each_abbrev to object_id
Make sha1_array_for_each_unique take a callback using struct object_id. Since one of these callbacks is an argument to for_each_abbrev, convert those as well. Rename various functions, replacing "sha1" with "oid". Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/cat-file.c')
-rw-r--r--builtin/cat-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 8fbb667..eb00432 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -401,10 +401,10 @@ struct object_cb_data {
struct expand_data *expand;
};
-static int batch_object_cb(const unsigned char sha1[20], void *vdata)
+static int batch_object_cb(const struct object_id *oid, void *vdata)
{
struct object_cb_data *data = vdata;
- hashcpy(data->expand->oid.hash, sha1);
+ oidcpy(&data->expand->oid, oid);
batch_object_write(NULL, data->opt, data->expand);
return 0;
}