Skip to content

Commit 9501d19

Browse files
moygitster
authored andcommitted
log: introduce init_log_defaults()
This is currently a wrapper around init_grep_defaults(), but will allow adding more initialization in further patches. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent a9276a6 commit 9501d19

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

builtin/log.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ static int log_line_range_callback(const struct option *option, const char *arg,
100100
return 0;
101101
}
102102

103+
static void init_log_defaults(void)
104+
{
105+
init_grep_defaults();
106+
}
107+
103108
static void cmd_log_init_defaults(struct rev_info *rev)
104109
{
105110
if (fmt_pretty)
@@ -416,7 +421,7 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
416421
struct rev_info rev;
417422
struct setup_revision_opt opt;
418423

419-
init_grep_defaults();
424+
init_log_defaults();
420425
git_config(git_log_config, NULL);
421426

422427
init_revisions(&rev, prefix);
@@ -527,7 +532,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
527532
struct pathspec match_all;
528533
int i, count, ret = 0;
529534

530-
init_grep_defaults();
535+
init_log_defaults();
531536
git_config(git_log_config, NULL);
532537

533538
memset(&match_all, 0, sizeof(match_all));
@@ -608,7 +613,7 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
608613
struct rev_info rev;
609614
struct setup_revision_opt opt;
610615

611-
init_grep_defaults();
616+
init_log_defaults();
612617
git_config(git_log_config, NULL);
613618

614619
init_revisions(&rev, prefix);
@@ -647,7 +652,7 @@ int cmd_log(int argc, const char **argv, const char *prefix)
647652
struct rev_info rev;
648653
struct setup_revision_opt opt;
649654

650-
init_grep_defaults();
655+
init_log_defaults();
651656
git_config(git_log_config, NULL);
652657

653658
init_revisions(&rev, prefix);
@@ -1280,7 +1285,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
12801285
extra_hdr.strdup_strings = 1;
12811286
extra_to.strdup_strings = 1;
12821287
extra_cc.strdup_strings = 1;
1283-
init_grep_defaults();
1288+
init_log_defaults();
12841289
git_config(git_format_config, NULL);
12851290
init_revisions(&rev, prefix);
12861291
rev.commit_format = CMIT_FMT_EMAIL;

0 commit comments

Comments
 (0)