diff-merges: rename all functions to have common prefix
Use the same "diff_merges" prefix for all the diff merges function names. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a37eec6333
commit
18f09473bf
@ -599,7 +599,7 @@ static int show_tree_object(const struct object_id *oid,
|
||||
static void show_setup_revisions_tweak(struct rev_info *rev,
|
||||
struct setup_revision_opt *opt)
|
||||
{
|
||||
rev_diff_merges_default_to_dense_combined(rev);
|
||||
diff_merges_default_to_dense_combined(rev);
|
||||
if (!rev->diffopt.output_format)
|
||||
rev->diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||
}
|
||||
@ -724,7 +724,7 @@ static void log_setup_revisions_tweak(struct rev_info *rev,
|
||||
if (!rev->diffopt.output_format && rev->combine_merges)
|
||||
rev->diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||
|
||||
rev_diff_merges_first_parent_defaults_to_enable(rev);
|
||||
diff_merges_first_parent_defaults_to_enable(rev);
|
||||
}
|
||||
|
||||
int cmd_log(int argc, const char **argv, const char *prefix)
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
#include "revision.h"
|
||||
|
||||
void init_diff_merge_revs(struct rev_info *revs)
|
||||
void diff_merges_init_revs(struct rev_info *revs)
|
||||
{
|
||||
revs->ignore_merges = -1;
|
||||
}
|
||||
|
||||
int parse_diff_merge_opts(struct rev_info *revs, const char **argv)
|
||||
int diff_merges_parse_opts(struct rev_info *revs, const char **argv)
|
||||
{
|
||||
int argcount = 1;
|
||||
const char *optarg;
|
||||
@ -46,7 +46,7 @@ int parse_diff_merge_opts(struct rev_info *revs, const char **argv)
|
||||
return argcount;
|
||||
}
|
||||
|
||||
void setup_diff_merges_revs(struct rev_info *revs)
|
||||
void diff_merges_setup_revs(struct rev_info *revs)
|
||||
{
|
||||
if (revs->combine_merges && revs->ignore_merges < 0)
|
||||
revs->ignore_merges = 0;
|
||||
@ -56,13 +56,13 @@ void setup_diff_merges_revs(struct rev_info *revs)
|
||||
die("--combined-all-paths makes no sense without -c or --cc");
|
||||
}
|
||||
|
||||
void rev_diff_merges_first_parent_defaults_to_enable(struct rev_info *revs)
|
||||
void diff_merges_first_parent_defaults_to_enable(struct rev_info *revs)
|
||||
{
|
||||
if (revs->first_parent_only && revs->ignore_merges < 0)
|
||||
revs->ignore_merges = 0;
|
||||
}
|
||||
|
||||
void rev_diff_merges_default_to_dense_combined(struct rev_info *revs)
|
||||
void diff_merges_default_to_dense_combined(struct rev_info *revs)
|
||||
{
|
||||
if (revs->ignore_merges < 0) {
|
||||
/* There was no "-m" variant on the command line */
|
||||
|
@ -9,10 +9,15 @@
|
||||
|
||||
struct rev_info;
|
||||
|
||||
void init_diff_merge_revs(struct rev_info *revs);
|
||||
int parse_diff_merge_opts(struct rev_info *revs, const char **argv);
|
||||
void setup_diff_merges_revs(struct rev_info *revs);
|
||||
void rev_diff_merges_default_to_dense_combined(struct rev_info *revs);
|
||||
void rev_diff_merges_first_parent_defaults_to_enable(struct rev_info *revs);
|
||||
void diff_merges_init_revs(struct rev_info *revs);
|
||||
|
||||
int diff_merges_parse_opts(struct rev_info *revs, const char **argv);
|
||||
|
||||
void diff_merges_setup_revs(struct rev_info *revs);
|
||||
|
||||
void diff_merges_default_to_dense_combined(struct rev_info *revs);
|
||||
|
||||
void diff_merges_first_parent_defaults_to_enable(struct rev_info *revs);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1814,7 +1814,7 @@ void repo_init_revisions(struct repository *r,
|
||||
|
||||
revs->repo = r;
|
||||
revs->abbrev = DEFAULT_ABBREV;
|
||||
init_diff_merge_revs(revs);
|
||||
diff_merges_init_revs(revs);
|
||||
revs->simplify_history = 1;
|
||||
revs->pruning.repo = r;
|
||||
revs->pruning.flags.recursive = 1;
|
||||
@ -2350,7 +2350,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
|
||||
revs->diff = 1;
|
||||
revs->diffopt.flags.recursive = 1;
|
||||
revs->diffopt.flags.tree_in_recursive = 1;
|
||||
} else if ((argcount = parse_diff_merge_opts(revs, argv))) {
|
||||
} else if ((argcount = diff_merges_parse_opts(revs, argv))) {
|
||||
return argcount;
|
||||
} else if (!strcmp(arg, "-v")) {
|
||||
revs->verbose_header = 1;
|
||||
@ -2849,7 +2849,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
|
||||
&revs->prune_data);
|
||||
}
|
||||
|
||||
setup_diff_merges_revs(revs);
|
||||
diff_merges_setup_revs(revs);
|
||||
|
||||
revs->diffopt.abbrev = revs->abbrev;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user