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>
Matthieu Moy committed
Feb 25, 2016 at 09:59 UTC
9501d191adca307d6fbe3f2ab111fa20414dd893
1 file changed
+10
-5
builtin/log.c
+10
-5
@@ -100,6 +100,11 @@ static int log_line_range_callback(const struct option *option, const char *arg,
100
return 0;
101
}
102
103
+static void init_log_defaults(void)
104
+{
105
+ init_grep_defaults();
106
+}
107
+
108
static void cmd_log_init_defaults(struct rev_info *rev)
109
{
110
if (fmt_pretty)
@@ -416,7 +421,7 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
421
struct rev_info rev;
422
struct setup_revision_opt opt;
423
419
- init_grep_defaults();
424
+ init_log_defaults();
425
git_config(git_log_config, NULL);
426
427
init_revisions(&rev, prefix);
@@ -527,7 +532,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
532
struct pathspec match_all;
533
int i, count, ret = 0;
534
530
- init_grep_defaults();
535
+ init_log_defaults();
536
git_config(git_log_config, NULL);
537
538
memset(&match_all, 0, sizeof(match_all));
@@ -608,7 +613,7 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
613
struct rev_info rev;
614
struct setup_revision_opt opt;
615
611
- init_grep_defaults();
616
+ init_log_defaults();
617
git_config(git_log_config, NULL);
618
619
init_revisions(&rev, prefix);
@@ -647,7 +652,7 @@ int cmd_log(int argc, const char **argv, const char *prefix)
652
struct rev_info rev;
653
struct setup_revision_opt opt;
654
650
- init_grep_defaults();
655
+ init_log_defaults();
656
git_config(git_log_config, NULL);
657
658
init_revisions(&rev, prefix);
@@ -1280,7 +1285,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1285
extra_hdr.strdup_strings = 1;
1286
extra_to.strdup_strings = 1;
1287
extra_cc.strdup_strings = 1;
1283
- init_grep_defaults();
1288
+ init_log_defaults();
1289
git_config(git_format_config, NULL);
1290
init_revisions(&rev, prefix);
1291
rev.commit_format = CMIT_FMT_EMAIL;