]> git.ipfire.org Git - thirdparty/git.git/blame - object-file-convert.h
Start the 2.46 cycle
[thirdparty/git.git] / object-file-convert.h
CommitLineData
5e9d802a
EB
1#ifndef OBJECT_CONVERT_H
2#define OBJECT_CONVERT_H
3
4struct repository;
5struct object_id;
6struct git_hash_algo;
7struct strbuf;
8#include "object.h"
9
10int repo_oid_to_algop(struct repository *repo, const struct object_id *src,
11 const struct git_hash_algo *to, struct object_id *dest);
12
13/*
14 * Convert an object file from one hash algorithm to another algorithm.
15 * Return -1 on failure, 0 on success.
16 */
17int convert_object_file(struct strbuf *outbuf,
18 const struct git_hash_algo *from,
19 const struct git_hash_algo *to,
20 const void *buf, size_t len,
21 enum object_type type,
22 int gentle);
23
24#endif /* OBJECT_CONVERT_H */