зеркало из https://github.com/microsoft/git.git
diff-merges: rename "combined_imply_patch" to "merges_imply_patch"
This is refactoring change in preparation for the next commit that will let -m imply -p. The old name doesn't match the intention to let not only -c/-cc imply -p, but also -m, that is not a "combined" format, so we rename the flag accordingly. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
1e20a407fe
Коммит
fd16a39944
|
@ -15,7 +15,7 @@ static void suppress(struct rev_info *revs)
|
|||
revs->combine_merges = 0;
|
||||
revs->dense_combined_merges = 0;
|
||||
revs->combined_all_paths = 0;
|
||||
revs->combined_imply_patch = 0;
|
||||
revs->merges_imply_patch = 0;
|
||||
revs->merges_need_diff = 0;
|
||||
}
|
||||
|
||||
|
@ -109,10 +109,10 @@ int diff_merges_parse_opts(struct rev_info *revs, const char **argv)
|
|||
set_to_default(revs);
|
||||
} else if (!strcmp(arg, "-c")) {
|
||||
set_combined(revs);
|
||||
revs->combined_imply_patch = 1;
|
||||
revs->merges_imply_patch = 1;
|
||||
} else if (!strcmp(arg, "--cc")) {
|
||||
set_dense_combined(revs);
|
||||
revs->combined_imply_patch = 1;
|
||||
revs->merges_imply_patch = 1;
|
||||
} else if (!strcmp(arg, "--no-diff-merges")) {
|
||||
suppress(revs);
|
||||
} else if (!strcmp(arg, "--combined-all-paths")) {
|
||||
|
@ -162,9 +162,9 @@ void diff_merges_setup_revs(struct rev_info *revs)
|
|||
revs->first_parent_merges = 0;
|
||||
if (revs->combined_all_paths && !revs->combine_merges)
|
||||
die("--combined-all-paths makes no sense without -c or --cc");
|
||||
if (revs->combined_imply_patch)
|
||||
if (revs->merges_imply_patch)
|
||||
revs->diff = 1;
|
||||
if (revs->combined_imply_patch || revs->merges_need_diff) {
|
||||
if (revs->merges_imply_patch || revs->merges_need_diff) {
|
||||
if (!revs->diffopt.output_format)
|
||||
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||
}
|
||||
|
|
|
@ -195,10 +195,10 @@ struct rev_info {
|
|||
/* Diff-merge flags */
|
||||
explicit_diff_merges: 1,
|
||||
merges_need_diff: 1,
|
||||
merges_imply_patch:1,
|
||||
separate_merges: 1,
|
||||
combine_merges:1,
|
||||
combined_all_paths:1,
|
||||
combined_imply_patch:1,
|
||||
dense_combined_merges:1,
|
||||
first_parent_merges:1;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче