Skip to content

Commit 043622b

Browse files
newrengitster
authored andcommitted
merge-recursive: use 'ci' for rename_conflict_info variable name
We used a couple different names, but used 'ci' the most. Use the same variable name throughout for a little extra consistency. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 93a02c5 commit 043622b

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

merge-recursive.c

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,7 +3098,7 @@ static int handle_content_merge(struct merge_options *opt,
30983098
struct object_id *o_oid, int o_mode,
30993099
struct object_id *a_oid, int a_mode,
31003100
struct object_id *b_oid, int b_mode,
3101-
struct rename_conflict_info *rename_conflict_info)
3101+
struct rename_conflict_info *ci)
31023102
{
31033103
const char *reason = _("content");
31043104
const char *path1 = NULL, *path2 = NULL;
@@ -3118,17 +3118,17 @@ static int handle_content_merge(struct merge_options *opt,
31183118
oidcpy(&b.oid, b_oid);
31193119
b.mode = b_mode;
31203120

3121-
if (rename_conflict_info) {
3122-
struct diff_filepair *pair1 = rename_conflict_info->pair1;
3121+
if (ci) {
3122+
struct diff_filepair *pair1 = ci->pair1;
31233123

3124-
path1 = (opt->branch1 == rename_conflict_info->branch1) ?
3124+
path1 = (opt->branch1 == ci->branch1) ?
31253125
pair1->two->path : pair1->one->path;
3126-
/* If rename_conflict_info->pair2 != NULL, we are in
3126+
/* If ci->pair2 != NULL, we are in
31273127
* RENAME_ONE_FILE_TO_ONE case. Otherwise, we have a
31283128
* normal rename.
31293129
*/
3130-
path2 = (rename_conflict_info->pair2 ||
3131-
opt->branch2 == rename_conflict_info->branch1) ?
3130+
path2 = (ci->pair2 ||
3131+
opt->branch2 == ci->branch1) ?
31323132
pair1->two->path : pair1->one->path;
31333133
one.path = pair1->one->path;
31343134
a.path = (char *)path1;
@@ -3180,7 +3180,7 @@ static int handle_content_merge(struct merge_options *opt,
31803180
reason = _("submodule");
31813181
output(opt, 1, _("CONFLICT (%s): Merge conflict in %s"),
31823182
reason, path);
3183-
if (rename_conflict_info && !df_conflict_remains)
3183+
if (ci && !df_conflict_remains)
31843184
if (update_stages(opt, path, &one, &a, &b))
31853185
return -1;
31863186
}
@@ -3206,7 +3206,7 @@ static int handle_content_merge(struct merge_options *opt,
32063206
}
32073207

32083208
}
3209-
new_path = unique_path(opt, path, rename_conflict_info->branch1);
3209+
new_path = unique_path(opt, path, ci->branch1);
32103210
if (is_dirty) {
32113211
output(opt, 1, _("Refusing to lose dirty file at %s"),
32123212
path);
@@ -3251,22 +3251,20 @@ static int process_entry(struct merge_options *opt,
32513251

32523252
entry->processed = 1;
32533253
if (entry->rename_conflict_info) {
3254-
struct rename_conflict_info *conflict_info = entry->rename_conflict_info;
3255-
switch (conflict_info->rename_type) {
3254+
struct rename_conflict_info *ci = entry->rename_conflict_info;
3255+
switch (ci->rename_type) {
32563256
case RENAME_NORMAL:
32573257
case RENAME_ONE_FILE_TO_ONE:
32583258
clean_merge = handle_rename_normal(opt,
32593259
path,
32603260
o_oid, o_mode,
32613261
a_oid, a_mode,
32623262
b_oid, b_mode,
3263-
conflict_info);
3263+
ci);
32643264
break;
32653265
case RENAME_VIA_DIR:
32663266
clean_merge = 1;
3267-
if (handle_rename_via_dir(opt,
3268-
conflict_info->pair1,
3269-
conflict_info->branch1))
3267+
if (handle_rename_via_dir(opt, ci->pair1, ci->branch1))
32703268
clean_merge = -1;
32713269
break;
32723270
case RENAME_ADD:
@@ -3276,19 +3274,17 @@ static int process_entry(struct merge_options *opt,
32763274
* two-way merged cleanly with the added file, I
32773275
* guess it's a clean merge?
32783276
*/
3279-
clean_merge = handle_rename_add(opt, conflict_info);
3277+
clean_merge = handle_rename_add(opt, ci);
32803278
break;
32813279
case RENAME_DELETE:
32823280
clean_merge = 0;
3283-
if (handle_rename_delete(opt,
3284-
conflict_info->pair1,
3285-
conflict_info->branch1,
3286-
conflict_info->branch2))
3281+
if (handle_rename_delete(opt, ci->pair1,
3282+
ci->branch1, ci->branch2))
32873283
clean_merge = -1;
32883284
break;
32893285
case RENAME_ONE_FILE_TO_TWO:
32903286
clean_merge = 0;
3291-
if (handle_rename_rename_1to2(opt, conflict_info))
3287+
if (handle_rename_rename_1to2(opt, ci))
32923288
clean_merge = -1;
32933289
break;
32943290
case RENAME_TWO_FILES_TO_ONE:
@@ -3298,8 +3294,7 @@ static int process_entry(struct merge_options *opt,
32983294
* can then be two-way merged cleanly, I guess it's
32993295
* a clean merge?
33003296
*/
3301-
clean_merge = handle_rename_rename_2to1(opt,
3302-
conflict_info);
3297+
clean_merge = handle_rename_rename_2to1(opt, ci);
33033298
break;
33043299
default:
33053300
entry->processed = 0;

0 commit comments

Comments
 (0)