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:
3
cache.h
3
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)
|
||||
|
||||
Reference in New Issue
Block a user