diff options
author | 2021-07-28 13:17:58 -0700 | |
---|---|---|
committer | 2021-07-28 13:17:58 -0700 | |
commit | c9d6d8a1938f86594b33785a8228d9f35ad457c8 (patch) | |
tree | 2b658bf0a8be2b3c2a736e6e4032acdb778da1aa /builtin | |
parent | Merge branch 'sm/worktree-add-lock' (diff) | |
parent | load_ref_decorations(): fix decoration with tags (diff) | |
download | tgif-c9d6d8a1938f86594b33785a8228d9f35ad457c8.tar.xz |
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()
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/log.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c index 516a1142dd..3d7717ba5c 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -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, |