@matheusbsbs / matheus-bagliano / commits / c1d20846f4
Fork 0

merge-recur: Cleanup last mixedCase variables...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johannes Schindelin committed Jul 27, 2006 at 19:13 UTC c1d20846f4a7112c44653dfe25411ccd19297790
1 file changed +23 -23
merge-recursive.c
+23 -23
@@ -609,7 +609,7 @@ static char *git_unpack_file(const unsigned char *sha1, char *path)
609
610 static struct merge_file_info merge_file(struct diff_filespec *o,
611 struct diff_filespec *a, struct diff_filespec *b,
612 - const char *branch1Name, const char *branch2Name)
612 + const char *branch1, const char *branch2)
613 {
614 struct merge_file_info result;
615 result.merge = 0;
@@ -651,8 +651,8 @@ static struct merge_file_info merge_file(struct diff_filespec *o,
651 git_unpack_file(a->sha1, src1);
652 git_unpack_file(b->sha1, src2);
653
654 - argv[2] = la = strdup(mkpath("%s/%s", branch1Name, a->path));
655 - argv[6] = lb = strdup(mkpath("%s/%s", branch2Name, b->path));
654 + argv[2] = la = strdup(mkpath("%s/%s", branch1, a->path));
655 + argv[6] = lb = strdup(mkpath("%s/%s", branch2, b->path));
656 argv[4] = lo = strdup(mkpath("orig/%s", o->path));
657 argv[7] = src1;
658 argv[8] = orig;
@@ -966,8 +966,8 @@ static unsigned char *has_sha(const unsigned char *sha)
966
967 /* Per entry merge function */
968 static int process_entry(const char *path, struct stage_data *entry,
969 - const char *branch1Name,
970 - const char *branch2Name)
969 + const char *branch1,
970 + const char *branch2)
971 {
972 /*
973 printf("processing entry, clean cache: %s\n", index_only ? "yes": "no");
@@ -997,14 +997,14 @@ static int process_entry(const char *path, struct stage_data *entry,
997 if (!a_sha) {
998 output("CONFLICT (delete/modify): %s deleted in %s "
999 "and modified in %s. Version %s of %s left in tree.",
1000 - path, branch1Name,
1001 - branch2Name, branch2Name, path);
1000 + path, branch1,
1001 + branch2, branch2, path);
1002 update_file(0, b_sha, b_mode, path);
1003 } else {
1004 output("CONFLICT (delete/modify): %s deleted in %s "
1005 "and modified in %s. Version %s of %s left in tree.",
1006 - path, branch2Name,
1007 - branch1Name, branch1Name, path);
1006 + path, branch2,
1007 + branch1, branch1, path);
1008 update_file(0, a_sha, a_mode, path);
1009 }
1010 }
@@ -1019,14 +1019,14 @@ static int process_entry(const char *path, struct stage_data *entry,
1019 const char *conf;
1020
1021 if (a_sha) {
1022 - add_branch = branch1Name;
1023 - other_branch = branch2Name;
1022 + add_branch = branch1;
1023 + other_branch = branch2;
1024 mode = a_mode;
1025 sha = a_sha;
1026 conf = "file/directory";
1027 } else {
1028 - add_branch = branch2Name;
1029 - other_branch = branch1Name;
1028 + add_branch = branch2;
1029 + other_branch = branch1;
1030 mode = b_mode;
1031 sha = b_sha;
1032 conf = "directory/file";
@@ -1060,8 +1060,8 @@ static int process_entry(const char *path, struct stage_data *entry,
1060 } else {
1061 const char *new_path1, *new_path2;
1062 clean_merge = 0;
1063 - new_path1 = unique_path(path, branch1Name);
1064 - new_path2 = unique_path(path, branch2Name);
1063 + new_path1 = unique_path(path, branch1);
1064 + new_path2 = unique_path(path, branch2);
1065 output("CONFLICT (add/add): File %s added non-identically "
1066 "in both branches. Adding as %s and %s instead.",
1067 path, new_path1, new_path2);
@@ -1085,7 +1085,7 @@ static int process_entry(const char *path, struct stage_data *entry,
1085 b.mode = b_mode;
1086
1087 mfi = merge_file(&o, &a, &b,
1088 - branch1Name, branch2Name);
1088 + branch1, branch2);
1089
1090 if (mfi.clean)
1091 update_file(1, mfi.sha, mfi.mode, path);
@@ -1111,8 +1111,8 @@ static int process_entry(const char *path, struct stage_data *entry,
1111 static int merge_trees(struct tree *head,
1112 struct tree *merge,
1113 struct tree *common,
1114 - const char *branch1Name,
1115 - const char *branch2Name,
1114 + const char *branch1,
1115 + const char *branch2,
1116 struct tree **result)
1117 {
1118 int code, clean;
@@ -1143,13 +1143,13 @@ static int merge_trees(struct tree *head,
1143 re_head = get_renames(head, common, head, merge, entries);
1144 re_merge = get_renames(merge, common, head, merge, entries);
1145 clean = process_renames(re_head, re_merge,
1146 - branch1Name, branch2Name);
1146 + branch1, branch2);
1147 for (i = 0; i < entries->nr; i++) {
1148 const char *path = entries->items[i].path;
1149 struct stage_data *e = entries->items[i].util;
1150 if (e->processed)
1151 continue;
1152 - if (!process_entry(path, e, branch1Name, branch2Name))
1152 + if (!process_entry(path, e, branch1, branch2))
1153 clean = 0;
1154 }
1155
@@ -1179,8 +1179,8 @@ static int merge_trees(struct tree *head,
1179 static
1180 int merge(struct commit *h1,
1181 struct commit *h2,
1182 - const char *branch1Name,
1183 - const char *branch2Name,
1182 + const char *branch1,
1183 + const char *branch2,
1184 int call_depth /* =0 */,
1185 struct commit *ancestor /* =None */,
1186 struct commit **result)
@@ -1236,7 +1236,7 @@ int merge(struct commit *h1,
1236 }
1237
1238 clean = merge_trees(h1->tree, h2->tree, merged_common_ancestors->tree,
1239 - branch1Name, branch2Name, &mrtree);
1239 + branch1, branch2, &mrtree);
1240
1241 if (!ancestor && (clean || index_only)) {
1242 *result = make_virtual_commit(mrtree, "merged tree");