summaryrefslogtreecommitdiff
path: root/src/libgit2/commit.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-02-14 17:01:23 +0000
committerGitHub <noreply@github.com>2023-02-14 17:01:23 +0000
commit80742e159c3221fd853d9a0fe735b382a7e3419d (patch)
tree60514c97fde6a8630a174d3b61781347913b4f70 /src/libgit2/commit.h
parentf7963f28cad7b2416a3cb0e55bc5adf85c82607b (diff)
parente3cd859150f720914dfbbdd2d80d12b1482a397a (diff)
downloadlibgit2-80742e159c3221fd853d9a0fe735b382a7e3419d.tar.gz
Merge pull request #6456 from libgit2/ethomson/sha256_experimental
SHA256: more SHA256 support
Diffstat (limited to 'src/libgit2/commit.h')
-rw-r--r--src/libgit2/commit.h32
1 files changed, 25 insertions, 7 deletions
diff --git a/src/libgit2/commit.h b/src/libgit2/commit.h
index 7a2454e61..c25fee327 100644
--- a/src/libgit2/commit.h
+++ b/src/libgit2/commit.h
@@ -33,6 +33,16 @@ struct git_commit {
char *body;
};
+typedef struct {
+ git_oid_t oid_type;
+ unsigned int flags;
+} git_commit__parse_options;
+
+typedef enum {
+ /** Only parse parents and committer info */
+ GIT_COMMIT_PARSE_QUICK = (1 << 0)
+} git_commit__parse_flags;
+
int git_commit__header_field(
git_str *out,
const git_commit *commit,
@@ -56,14 +66,22 @@ int git_commit__create_buffer(
size_t parent_count,
const git_commit *parents[]);
-void git_commit__free(void *commit);
-int git_commit__parse(void *commit, git_odb_object *obj);
-int git_commit__parse_raw(void *commit, const char *data, size_t size);
+int git_commit__parse(
+ void *commit,
+ git_odb_object *obj,
+ git_oid_t oid_type);
-typedef enum {
- GIT_COMMIT_PARSE_QUICK = (1 << 0) /**< Only parse parents and committer info */
-} git_commit__parse_flags;
+int git_commit__parse_raw(
+ void *commit,
+ const char *data,
+ size_t size,
+ git_oid_t oid_type);
-int git_commit__parse_ext(git_commit *commit, git_odb_object *odb_obj, unsigned int flags);
+int git_commit__parse_ext(
+ git_commit *commit,
+ git_odb_object *odb_obj,
+ git_commit__parse_options *parse_opts);
+
+void git_commit__free(void *commit);
#endif