Skip to content

Commit fd16a39

Browse files
sorganovgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1e20a40 commit fd16a39

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

diff-merges.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ static void suppress(struct rev_info *revs)
1515
revs->combine_merges = 0;
1616
revs->dense_combined_merges = 0;
1717
revs->combined_all_paths = 0;
18-
revs->combined_imply_patch = 0;
18+
revs->merges_imply_patch = 0;
1919
revs->merges_need_diff = 0;
2020
}
2121

@@ -109,10 +109,10 @@ int diff_merges_parse_opts(struct rev_info *revs, const char **argv)
109109
set_to_default(revs);
110110
} else if (!strcmp(arg, "-c")) {
111111
set_combined(revs);
112-
revs->combined_imply_patch = 1;
112+
revs->merges_imply_patch = 1;
113113
} else if (!strcmp(arg, "--cc")) {
114114
set_dense_combined(revs);
115-
revs->combined_imply_patch = 1;
115+
revs->merges_imply_patch = 1;
116116
} else if (!strcmp(arg, "--no-diff-merges")) {
117117
suppress(revs);
118118
} else if (!strcmp(arg, "--combined-all-paths")) {
@@ -162,9 +162,9 @@ void diff_merges_setup_revs(struct rev_info *revs)
162162
revs->first_parent_merges = 0;
163163
if (revs->combined_all_paths && !revs->combine_merges)
164164
die("--combined-all-paths makes no sense without -c or --cc");
165-
if (revs->combined_imply_patch)
165+
if (revs->merges_imply_patch)
166166
revs->diff = 1;
167-
if (revs->combined_imply_patch || revs->merges_need_diff) {
167+
if (revs->merges_imply_patch || revs->merges_need_diff) {
168168
if (!revs->diffopt.output_format)
169169
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
170170
}

revision.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ struct rev_info {
195195
/* Diff-merge flags */
196196
explicit_diff_merges: 1,
197197
merges_need_diff: 1,
198+
merges_imply_patch:1,
198199
separate_merges: 1,
199200
combine_merges:1,
200201
combined_all_paths:1,
201-
combined_imply_patch:1,
202202
dense_combined_merges:1,
203203
first_parent_merges:1;
204204

0 commit comments

Comments
 (0)