diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-21 10:49:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-21 10:49:26 -0700 |
commit | d25a265220f7e9a50693d0ec4bb05c7be0539d69 (patch) | |
tree | 34bf878cbc1181b0614ad7ba210d48f0ad550fa3 /commit.h | |
parent | e63f87a6f7a4e55f50e67b112f26d9a1e4e7f3ab (diff) | |
parent | baf18fc261ca475343fe3cb9cd2c0dded4bc1bb7 (diff) | |
download | git-d25a265220f7e9a50693d0ec4bb05c7be0539d69.tar.gz |
Merge branch 'nd/maint-autofix-tag-in-head' into maint
* nd/maint-autofix-tag-in-head:
Accept tags in HEAD or MERGE_HEAD
merge: remove global variable head[]
merge: use return value of resolve_ref() to determine if HEAD is invalid
merge: keep stash[] a local variable
Conflicts:
builtin/merge.c
Diffstat (limited to 'commit.h')
-rw-r--r-- | commit.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |