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>
This commit is contained in:
1
commit.h
1
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);
|
||||
|
||||
|
Reference in New Issue
Block a user