From: Junio C Hamano Date: Sun, 9 May 2010 05:36:14 +0000 (-0700) Subject: Merge branch 'sd/log-decorate' X-Git-Tag: v1.7.2-rc0~154 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=72d9b222a940c93a8d915c26a4d5d077e23be871;p=git.git Merge branch 'sd/log-decorate' * sd/log-decorate: log.decorate: only ignore it under "log --pretty=raw" script with rev-list instead of log log --pretty/--oneline: ignore log.decorate log.decorate: usability fixes Add `log.decorate' configuration variable. git_config_maybe_bool() Conflicts: builtin/log.c --- 72d9b222a940c93a8d915c26a4d5d077e23be871 diff --cc builtin/log.c index 6208703c0,017fcf82c..976e16f9f --- a/builtin/log.c +++ b/builtin/log.c @@@ -31,12 -32,28 +32,29 @@@ static const char * const builtin_log_u "git log [] [..] [[--] ...]\n" " or: git show [options] ..."; + static int parse_decoration_style(const char *var, const char *value) + { + switch (git_config_maybe_bool(var, value)) { + case 1: + return DECORATE_SHORT_REFS; + case 0: + return 0; + default: + break; + } + if (!strcmp(value, "full")) + return DECORATE_FULL_REFS; + else if (!strcmp(value, "short")) + return DECORATE_SHORT_REFS; + return -1; + } + static void cmd_log_init(int argc, const char **argv, const char *prefix, - struct rev_info *rev) + struct rev_info *rev, struct setup_revision_opt *opt) { int i; - int decoration_style = 0; + int decoration_given = 0; + struct userformat_want w; rev->abbrev = DEFAULT_ABBREV; rev->commit_format = CMIT_FMT_DEFAULT;