diff options
author | Jeff King <peff@peff.net> | 2021-01-28 07:12:35 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-28 20:21:07 +0100 |
commit | 98c431b6f9c767657e1c8cb57370fd1db82b341e (patch) | |
tree | db31752bd7090672b3eea34e694697e80179760c /commit.h | |
parent | The fourth batch (diff) | |
download | git-98c431b6f9c767657e1c8cb57370fd1db82b341e.tar.xz git-98c431b6f9c767657e1c8cb57370fd1db82b341e.zip |
commit_graft_pos(): take an oid instead of a bare hash
All of our callers have an object_id, and are just dereferencing the
hash field to pass to us. Let's take the actual object_id instead. We
still access the hash to pass to hash_pos, but it's a step in the right
direction.
This makes the callers slightly simpler, but also gets rid of the
untyped pointer, as well as the now-inaccurate name "sha1".
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -239,7 +239,7 @@ typedef int (*each_commit_graft_fn)(const struct commit_graft *, void *); struct commit_graft *read_graft_line(struct strbuf *line); /* commit_graft_pos returns an index into r->parsed_objects->grafts. */ -int commit_graft_pos(struct repository *r, const unsigned char *sha1); +int commit_graft_pos(struct repository *r, const struct object_id *oid); int register_commit_graft(struct repository *r, struct commit_graft *, int); void prepare_commit_graft(struct repository *r); struct commit_graft *lookup_commit_graft(struct repository *r, const struct object_id *oid); |