summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-07-28 20:17:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-28 20:17:58 (GMT)
commitc9d6d8a1938f86594b33785a8228d9f35ad457c8 (patch)
tree2b658bf0a8be2b3c2a736e6e4032acdb778da1aa /builtin/log.c
parent01369fdfd3d0deec41c55306dae42f00dfbfa582 (diff)
parentd1ed8d6cee57c91ec770a8a183ed40c3ec867ac1 (diff)
downloadgit-c9d6d8a1938f86594b33785a8228d9f35ad457c8.zip
git-c9d6d8a1938f86594b33785a8228d9f35ad457c8.tar.gz
git-c9d6d8a1938f86594b33785a8228d9f35ad457c8.tar.bz2
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/log.c')
-rw-r--r--builtin/log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 516a114..3d7717b 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,