X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=commit.h;h=14f6a5a2ed91e2176cce4543798774f88a8628b1;hb=4b340593551217904d794cc0a8db55db89b5b066;hp=9bf3fefea25aa128a8f22dd9586ee0c119cbbac6;hpb=09d46644b780ede1a6b757db3e1a1ae9c1128a13;p=git.git diff --git a/commit.h b/commit.h index 9bf3fefea..14f6a5a2e 100644 --- a/commit.h +++ b/commit.h @@ -38,6 +38,13 @@ struct commit *lookup_commit_reference_gently(const unsigned char *sha1, int quiet); struct commit *lookup_commit_reference_by_name(const char *name); +/* + * Look up object named by "sha1", dereference tag as necessary, + * get a commit and return it. If "sha1" does not dereference to + * a commit, use ref_name to report an error and die. + */ +struct commit *lookup_commit_or_die(const unsigned char *sha1, const char *ref_name); + int parse_commit_buffer(struct commit *item, const void *buffer, unsigned long size); int parse_commit(struct commit *item); @@ -154,7 +161,6 @@ extern struct commit_list *get_octopus_merge_bases(struct commit_list *in); extern int register_shallow(const unsigned char *sha1); extern int unregister_shallow(const unsigned char *sha1); -extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol); extern int for_each_commit_graft(each_commit_graft_fn, void *); extern int is_repository_shallow(void); extern struct commit_list *get_shallow_commits(struct object_array *heads,