From a6fa59924d154f2dcfc331357bf553e043aa0242 Mon Sep 17 00:00:00 2001 From: Pat Notz Date: Tue, 2 Nov 2010 13:59:07 -0600 Subject: 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 Signed-off-by: Junio C Hamano --- cache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 3d5ed51989..7d498056b2 100644 --- a/cache.h +++ b/cache.h @@ -1003,6 +1003,9 @@ extern int git_env_bool(const char *, int); extern int git_config_system(void); extern int git_config_global(void); extern int config_error_nonbool(const char *); +extern const char *get_log_output_encoding(void); +extern const char *get_commit_output_encoding(void); + extern const char *config_exclusive_filename; #define MAX_GITNAME (1000) -- cgit v1.2.1