Merge branch 'jk/log-decorate-optim'

Optimize "git log" for cases where we wasted cycles to load ref
decoration data that may not be needed.

* jk/log-decorate-optim:
  load_ref_decorations(): fix decoration with tags
  add_ref_decoration(): rename s/type/deco_type/
  load_ref_decorations(): avoid parsing non-tag objects
  object.h: add lookup_object_by_type() function
  object.h: expand docstring for lookup_unknown_object()
  log: avoid loading decorations for userformats that don't need it
  pretty.h: update and expand docstring for userformat_find_requirements()
This commit is contained in:
Junio C Hamano
2021-07-28 13:17:58 -07:00
8 changed files with 77 additions and 32 deletions

View File

@ -245,6 +245,9 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix,
rev->abbrev_commit = 0;
}
if (rev->commit_format == CMIT_FMT_USERFORMAT && !w.decorate)
decoration_style = 0;
if (decoration_style) {
const struct string_list *config_exclude =
repo_config_get_value_multi(the_repository,