summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8420ccd)
raw | patch | inline | side by side (parent: 8420ccd)
author | Steven Drake <sdrake@xnet.co.nz> | |
Tue, 16 Feb 2010 23:39:52 +0000 (12:39 +1300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 17 Feb 2010 17:51:23 +0000 (09:51 -0800) |
This alows the 'git-log --decorate' to be enabled by default so that normal
log outout contains ant ref names of commits that are shown.
Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
log outout contains ant ref names of commits that are shown.
Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | patch | blob | history | |
builtin-log.c | patch | blob | history |
index 4c36aa95b7d3fc0d456d42bbdfdf5a118931094b..db280326de7919666b350e898bb9476098b67c9c 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
following alternatives: {relative,local,default,iso,rfc,short}.
See linkgit:git-log[1].
+log.decorate::
+ Print out the ref names of any commits that are shown by the log
+ command. If 'short' is specified, the ref name prefixes 'refs/heads/',
+ 'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is
+ specified, the full ref name (including prefix) will be printed.
+ This is the same as the log commands '--decorate' option.
+
log.showroot::
If true, the initial commit will be shown as a big creation event.
This is equivalent to a diff against an empty tree.
diff --git a/builtin-log.c b/builtin-log.c
index 8d16832f7e9483f7903009459a72efc39e267c98..3100dc00a8b4d0c48f9febc1178befa37226b5d0 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
static const char *default_date_mode = NULL;
static int default_show_root = 1;
+static int decoration_style = 0;
static const char *fmt_patch_subject_prefix = "PATCH";
static const char *fmt_pretty;
struct rev_info *rev)
{
int i;
- int decoration_style = 0;
rev->abbrev = DEFAULT_ABBREV;
rev->commit_format = CMIT_FMT_DEFAULT;
return git_config_string(&fmt_patch_subject_prefix, var, value);
if (!strcmp(var, "log.date"))
return git_config_string(&default_date_mode, var, value);
+ if (!strcmp(var, "log.decorate")) {
+ if (!strcmp(value, "full"))
+ decoration_style = DECORATE_FULL_REFS;
+ else if (!strcmp(value, "short"))
+ decoration_style = DECORATE_SHORT_REFS;
+ return 0;
+ }
if (!strcmp(var, "log.showroot")) {
default_show_root = git_config_bool(var, value);
return 0;