summaryrefslogtreecommitdiffstats
path: root/commit.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-14 04:03:19 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-14 04:03:19 +0200
commit0fd8cb3fec7abb36505a150fe5cfa9b1d8b85496 (patch)
treee8ff37c5dce1e0eb7e33da89d487fcb21bbec6c0 /commit.h
parentMerge branch 'bw/grep-no-index-no-exclude' (diff)
parentAccept tags in HEAD or MERGE_HEAD (diff)
downloadgit-0fd8cb3fec7abb36505a150fe5cfa9b1d8b85496.tar.xz
git-0fd8cb3fec7abb36505a150fe5cfa9b1d8b85496.zip
Merge branch 'nd/maint-autofix-tag-in-head'
* 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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index 12d100b8b6..14f6a5a2ed 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);