names are shown. This is the same as the `--decorate` option
of the `git log`.
+log.initialDecorationSet::
+ By default, `git log` only shows decorations for certain known ref
+ namespaces. If 'all' is specified, then show all refs as
+ decorations.
+
log.excludeDecoration::
Exclude the specified patterns from the log decorations. This is
similar to the `--decorate-refs-exclude` command-line option, but
--clear-decorations::
When specified, this option clears all previous `--decorate-refs`
or `--decorate-refs-exclude` options and relaxes the default
- decoration filter to include all references.
+ decoration filter to include all references. This option is
+ assumed if the config value `log.initialDecorationSet` is set to
+ `all`.
--source::
Print out the ref name given on the command line by which each
static void set_default_decoration_filter(struct decoration_filter *decoration_filter)
{
int i;
+ char *value = NULL;
struct string_list *include = decoration_filter->include_ref_pattern;
const struct string_list *config_exclude =
git_config_get_value_multi("log.excludeDecoration");
item->string);
}
+ /*
+ * By default, decorate_all is disabled. Enable it if
+ * log.initialDecorationSet=all. Don't ever disable it by config,
+ * since the command-line takes precedent.
+ */
+ if (use_default_decoration_filter &&
+ !git_config_get_string("log.initialdecorationset", &value) &&
+ !strcmp("all", value))
+ use_default_decoration_filter = 0;
+ free(value);
+
if (!use_default_decoration_filter ||
decoration_filter->exclude_ref_pattern->nr ||
decoration_filter->include_ref_pattern->nr ||
EOF
git log --decorate=full --pretty="tformat:%f%d" \
--clear-decorations >actual &&
+ test_cmp expect.all actual &&
+ git -c log.initialDecorationSet=all log \
+ --decorate=full --pretty="tformat:%f%d" >actual &&
test_cmp expect.all actual
'