log-tree: call load_ref_decorations() in get_name_decoration()
Load a default set of ref name decorations at the first lookup. This frees direct and indirect callers from doing so. They can still do it if they want to use a filter or are interested in full decorations instead of the default short ones -- the first load_ref_decorations() call wins. This means that the load in builtin/log.c::cmd_log_init_finish() is respected even if --simplify-by-decoration is given, as the previously dominating earlier load in handle_revision_opt() is gone. So a filter given with --decorate-refs-exclude is used for simplification in that case, as expected. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
b4ecbcf6a2
commit
0cc7380d88
@ -77,6 +77,7 @@ void add_name_decoration(enum decoration_type type, const char *name, struct obj
|
||||
|
||||
const struct name_decoration *get_name_decoration(const struct object *obj)
|
||||
{
|
||||
load_ref_decorations(NULL, DECORATE_SHORT_REFS);
|
||||
return lookup_decoration(&name_decoration, obj);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user