summaryrefslogtreecommitdiffstats
path: root/commit.h
diff options
context:
space:
mode:
authorPat Notz <patnotz@gmail.com>2010-11-02 20:59:07 +0100
committerJunio C Hamano <gitster@pobox.com>2010-11-04 21:53:34 +0100
commita6fa59924d154f2dcfc331357bf553e043aa0242 (patch)
tree0b70643b0e0a30f6d97acce2a9142af0a80fcde7 /commit.h
parentMerge branch 'maint' (diff)
downloadgit-a6fa59924d154f2dcfc331357bf553e043aa0242.tar.xz
git-a6fa59924d154f2dcfc331357bf553e043aa0242.zip
commit: helper methods to reduce redundant blocks of code
* builtin/commit.c: Replace block of code with a one-liner call to logmsg_reencode(). * commit.c: new function for looking up a comit by name * pretty.c: helper methods for getting output encodings Add helpers get_log_output_encoding() and get_commit_output_encoding() that eliminate some messy and duplicate if-blocks. Signed-off-by: Pat Notz <patnotz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index 9113bbe488..a0b710f843 100644
--- a/commit.h
+++ b/commit.h
@@ -36,6 +36,7 @@ struct commit *lookup_commit(const unsigned char *sha1);
struct commit *lookup_commit_reference(const unsigned char *sha1);
struct commit *lookup_commit_reference_gently(const unsigned char *sha1,
int quiet);
+struct commit *lookup_commit_reference_by_name(const char *name);
int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size);