i18n: merge-recursive: mark strings for translation
Mark strings in merge-recursive for translation. Some tests would start to fail with GETTEXT_POISON turned on after this update. Use test_i18ncmp and test_i18ngrep where appropriate to mark strings that should only be checked in the C locale output to avoid such issues. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin committed
Jul 25, 2012 at 22:53 UTC
55653a689e17cfa896aa0454e751a9002b519f4b
3 files changed
+88
-78
merge-recursive.c
+79
-69
@@ -187,7 +187,7 @@ static void output_commit_title(struct merge_options *o, struct commit *commit)
187
else {
188
printf("%s ", find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
189
if (parse_commit(commit) != 0)
190
- printf("(bad commit)\n");
190
+ printf(_("(bad commit)\n"));
191
else {
192
const char *title;
193
int len = find_commit_subject(commit->buffer, &title);
@@ -203,7 +203,7 @@ static int add_cacheinfo(unsigned int mode, const unsigned char *sha1,
203
struct cache_entry *ce;
204
ce = make_cache_entry(mode, sha1 ? sha1 : null_sha1, path, stage, refresh);
205
if (!ce)
206
- return error("addinfo_cache failed for path '%s'", path);
206
+ return error(_("addinfo_cache failed for path '%s'"), path);
207
return add_cache_entry(ce, options);
208
}
209
@@ -265,7 +265,7 @@ struct tree *write_tree_from_memory(struct merge_options *o)
265
if (!cache_tree_fully_valid(active_cache_tree) &&
266
cache_tree_update(active_cache_tree,
267
active_cache, active_nr, 0) < 0)
268
- die("error building trees");
268
+ die(_("error building trees"));
269
270
result = lookup_tree(active_cache_tree->sha1);
271
@@ -494,7 +494,7 @@ static struct string_list *get_renames(struct merge_options *o,
494
opts.show_rename_progress = o->show_rename_progress;
495
opts.output_format = DIFF_FORMAT_NO_OUTPUT;
496
if (diff_setup_done(&opts) < 0)
497
- die("diff setup failed");
497
+ die(_("diff setup failed"));
498
diff_tree_sha1(o_tree->object.sha1, tree->object.sha1, "", &opts);
499
diffcore_std(&opts);
500
if (opts.needed_rename_limit > o->needed_rename_limit)
@@ -624,7 +624,7 @@ static void flush_buffer(int fd, const char *buf, unsigned long size)
624
break;
625
die_errno("merge-recursive");
626
} else if (!ret) {
627
- die("merge-recursive: disk full?");
627
+ die(_("merge-recursive: disk full?"));
628
}
629
size -= ret;
630
buf += ret;
@@ -687,7 +687,7 @@ static int would_lose_untracked(const char *path)
687
static int make_room_for_path(struct merge_options *o, const char *path)
688
{
689
int status, i;
690
- const char *msg = "failed to create path '%s'%s";
690
+ const char *msg = _("failed to create path '%s'%s");
691
692
/* Unlink any D/F conflict files that are in the way */
693
for (i = 0; i < o->df_conflict_file_set.nr; i++) {
@@ -698,7 +698,7 @@ static int make_room_for_path(struct merge_options *o, const char *path)
698
path[df_pathlen] == '/' &&
699
strncmp(path, df_path, df_pathlen) == 0) {
700
output(o, 3,
701
- "Removing %s to make room for subdirectory\n",
701
+ _("Removing %s to make room for subdirectory\n"),
702
df_path);
703
unlink(df_path);
704
unsorted_string_list_delete_item(&o->df_conflict_file_set,
@@ -712,7 +712,7 @@ static int make_room_for_path(struct merge_options *o, const char *path)
712
if (status) {
713
if (status == -3) {
714
/* something else exists */
715
- error(msg, path, ": perhaps a D/F conflict?");
715
+ error(msg, path, _(": perhaps a D/F conflict?"));
716
return -1;
717
}
718
die(msg, path, "");
@@ -723,7 +723,7 @@ static int make_room_for_path(struct merge_options *o, const char *path)
723
* tracking it.
724
*/
725
if (would_lose_untracked(path))
726
- return error("refusing to lose untracked file at '%s'",
726
+ return error(_("refusing to lose untracked file at '%s'"),
727
path);
728
729
/* Successful unlink is good.. */
@@ -733,7 +733,7 @@ static int make_room_for_path(struct merge_options *o, const char *path)
733
if (errno == ENOENT)
734
return 0;
735
/* .. but not some other error (who really cares what?) */
736
- return error(msg, path, ": perhaps a D/F conflict?");
736
+ return error(msg, path, _(": perhaps a D/F conflict?"));
737
}
738
739
static void update_file_flags(struct merge_options *o,
@@ -763,9 +763,9 @@ static void update_file_flags(struct merge_options *o,
763
764
buf = read_sha1_file(sha, &type, &size);
765
if (!buf)
766
- die("cannot read object %s '%s'", sha1_to_hex(sha), path);
766
+ die(_("cannot read object %s '%s'"), sha1_to_hex(sha), path);
767
if (type != OBJ_BLOB)
768
- die("blob expected for %s '%s'", sha1_to_hex(sha), path);
768
+ die(_("blob expected for %s '%s'"), sha1_to_hex(sha), path);
769
if (S_ISREG(mode)) {
770
struct strbuf strbuf = STRBUF_INIT;
771
if (convert_to_working_tree(path, buf, size, &strbuf)) {
@@ -788,7 +788,7 @@ static void update_file_flags(struct merge_options *o,
788
mode = 0666;
789
fd = open(path, O_WRONLY | O_TRUNC | O_CREAT, mode);
790
if (fd < 0)
791
- die_errno("failed to open '%s'", path);
791
+ die_errno(_("failed to open '%s'"), path);
792
flush_buffer(fd, buf, size);
793
close(fd);
794
} else if (S_ISLNK(mode)) {
@@ -796,10 +796,10 @@ static void update_file_flags(struct merge_options *o,
796
safe_create_leading_directories_const(path);
797
unlink(path);
798
if (symlink(lnk, path))
799
- die_errno("failed to symlink '%s'", path);
799
+ die_errno(_("failed to symlink '%s'"), path);
800
free(lnk);
801
} else
802
- die("do not know what to do with %06o %s '%s'",
802
+ die(_("do not know what to do with %06o %s '%s'"),
803
mode, sha1_to_hex(sha), path);
804
free(buf);
805
}
@@ -936,11 +936,11 @@ static struct merge_file_info merge_file_1(struct merge_options *o,
936
branch1, branch2);
937
938
if ((merge_status < 0) || !result_buf.ptr)
939
- die("Failed to execute internal merge");
939
+ die(_("Failed to execute internal merge"));
940
941
if (write_sha1_file(result_buf.ptr, result_buf.size,
942
blob_type, result.sha))
943
- die("Unable to add %s to database",
943
+ die(_("Unable to add %s to database"),
944
a->path);
945
946
free(result_buf.ptr);
@@ -956,7 +956,7 @@ static struct merge_file_info merge_file_1(struct merge_options *o,
956
if (!sha_eq(a->sha1, b->sha1))
957
result.clean = 0;
958
} else {
959
- die("unsupported object type in the tree");
959
+ die(_("unsupported object type in the tree"));
960
}
961
}
962
@@ -1034,22 +1034,32 @@ static void handle_change_delete(struct merge_options *o,
1034
remove_file_from_cache(path);
1035
update_file(o, 0, o_sha, o_mode, renamed ? renamed : path);
1036
} else if (!a_sha) {
1037
- output(o, 1, "CONFLICT (%s/delete): %s deleted in %s "
1038
- "and %s in %s. Version %s of %s left in tree%s%s.",
1039
- change, path, o->branch1,
1040
- change_past, o->branch2, o->branch2, path,
1041
- NULL == renamed ? "" : " at ",
1042
- NULL == renamed ? "" : renamed);
1043
- update_file(o, 0, b_sha, b_mode, renamed ? renamed : path);
1037
+ if (!renamed) {
1038
+ output(o, 1, _("CONFLICT (%s/delete): %s deleted in %s "
1039
+ "and %s in %s. Version %s of %s left in tree."),
1040
+ change, path, o->branch1, change_past,
1041
+ o->branch2, o->branch2, path);
1042
+ update_file(o, 0, b_sha, b_mode, path);
1043
+ } else {
1044
+ output(o, 1, _("CONFLICT (%s/delete): %s deleted in %s "
1045
+ "and %s in %s. Version %s of %s left in tree at %s."),
1046
+ change, path, o->branch1, change_past,
1047
+ o->branch2, o->branch2, path, renamed);
1048
+ update_file(o, 0, b_sha, b_mode, renamed);
1049
+ }
1050
} else {
1045
- output(o, 1, "CONFLICT (%s/delete): %s deleted in %s "
1046
- "and %s in %s. Version %s of %s left in tree%s%s.",
1047
- change, path, o->branch2,
1048
- change_past, o->branch1, o->branch1, path,
1049
- NULL == renamed ? "" : " at ",
1050
- NULL == renamed ? "" : renamed);
1051
- if (renamed)
1051
+ if (!renamed) {
1052
+ output(o, 1, _("CONFLICT (%s/delete): %s deleted in %s "
1053
+ "and %s in %s. Version %s of %s left in tree."),
1054
+ change, path, o->branch2, change_past,
1055
+ o->branch1, o->branch1, path);
1056
+ } else {
1057
+ output(o, 1, _("CONFLICT (%s/delete): %s deleted in %s "
1058
+ "and %s in %s. Version %s of %s left in tree at %s."),
1059
+ change, path, o->branch2, change_past,
1060
+ o->branch1, o->branch1, path, renamed);
1061
update_file(o, 0, a_sha, a_mode, renamed);
1062
+ }
1063
/*
1064
* No need to call update_file() on path when !renamed, since
1065
* that would needlessly touch path. We could call
@@ -1085,7 +1095,7 @@ static void conflict_rename_delete(struct merge_options *o,
1095
orig->sha1, orig->mode,
1096
a_sha, a_mode,
1097
b_sha, b_mode,
1088
- "rename", "renamed");
1098
+ _("rename"), _("renamed"));
1099
1100
if (o->call_depth) {
1101
remove_file_from_cache(dest->path);
@@ -1141,7 +1151,7 @@ static void handle_file(struct merge_options *o,
1151
} else {
1152
if (dir_in_way(rename->path, !o->call_depth)) {
1153
dst_name = unique_path(o, rename->path, cur_branch);
1144
- output(o, 1, "%s is a directory in %s adding as %s instead",
1154
+ output(o, 1, _("%s is a directory in %s adding as %s instead"),
1155
rename->path, other_branch, dst_name);
1156
}
1157
}
@@ -1163,12 +1173,12 @@ static void conflict_rename_rename_1to2(struct merge_options *o,
1173
struct diff_filespec *a = ci->pair1->two;
1174
struct diff_filespec *b = ci->pair2->two;
1175
1166
- output(o, 1, "CONFLICT (rename/rename): "
1176
+ output(o, 1, _("CONFLICT (rename/rename): "
1177
"Rename \"%s\"->\"%s\" in branch \"%s\" "
1168
- "rename \"%s\"->\"%s\" in \"%s\"%s",
1178
+ "rename \"%s\"->\"%s\" in \"%s\"%s"),
1179
one->path, a->path, ci->branch1,
1180
one->path, b->path, ci->branch2,
1171
- o->call_depth ? " (left unresolved)" : "");
1181
+ o->call_depth ? _(" (left unresolved)") : "");
1182
if (o->call_depth) {
1183
struct merge_file_info mfi;
1184
struct diff_filespec other;
@@ -1222,9 +1232,9 @@ static void conflict_rename_rename_2to1(struct merge_options *o,
1232
struct merge_file_info mfi_c1;
1233
struct merge_file_info mfi_c2;
1234
1225
- output(o, 1, "CONFLICT (rename/rename): "
1235
+ output(o, 1, _("CONFLICT (rename/rename): "
1236
"Rename %s->%s in %s. "
1227
- "Rename %s->%s in %s",
1237
+ "Rename %s->%s in %s"),
1238
a->path, c1->path, ci->branch1,
1239
b->path, c2->path, ci->branch2);
1240
@@ -1252,7 +1262,7 @@ static void conflict_rename_rename_2to1(struct merge_options *o,
1262
} else {
1263
char *new_path1 = unique_path(o, path, ci->branch1);
1264
char *new_path2 = unique_path(o, path, ci->branch2);
1255
- output(o, 1, "Renaming %s to %s and %s to %s instead",
1265
+ output(o, 1, _("Renaming %s to %s and %s to %s instead"),
1266
a->path, new_path1, b->path, new_path2);
1267
remove_file(o, 0, path, 0);
1268
update_file(o, 0, mfi_c1.sha, mfi_c1.mode, new_path1);
@@ -1451,8 +1461,8 @@ static int process_renames(struct merge_options *o,
1461
} else if (!sha_eq(dst_other.sha1, null_sha1)) {
1462
clean_merge = 0;
1463
try_merge = 1;
1454
- output(o, 1, "CONFLICT (rename/add): Rename %s->%s in %s. "
1455
- "%s added in %s",
1464
+ output(o, 1, _("CONFLICT (rename/add): Rename %s->%s in %s. "
1465
+ "%s added in %s"),
1466
ren1_src, ren1_dst, branch1,
1467
ren1_dst, branch2);
1468
if (o->call_depth) {
@@ -1461,12 +1471,12 @@ static int process_renames(struct merge_options *o,
1471
ren1->pair->two->sha1, ren1->pair->two->mode,
1472
dst_other.sha1, dst_other.mode,
1473
branch1, branch2);
1464
- output(o, 1, "Adding merged %s", ren1_dst);
1474
+ output(o, 1, _("Adding merged %s"), ren1_dst);
1475
update_file(o, 0, mfi.sha, mfi.mode, ren1_dst);
1476
try_merge = 0;
1477
} else {
1478
char *new_path = unique_path(o, ren1_dst, branch2);
1469
- output(o, 1, "Adding as %s instead", new_path);
1479
+ output(o, 1, _("Adding as %s instead"), new_path);
1480
update_file(o, 0, dst_other.sha1, dst_other.mode, new_path);
1481
free(new_path);
1482
}
@@ -1517,10 +1527,10 @@ static int read_sha1_strbuf(const unsigned char *sha1, struct strbuf *dst)
1527
unsigned long size;
1528
buf = read_sha1_file(sha1, &type, &size);
1529
if (!buf)
1520
- return error("cannot read object %s", sha1_to_hex(sha1));
1530
+ return error(_("cannot read object %s"), sha1_to_hex(sha1));
1531
if (type != OBJ_BLOB) {
1532
free(buf);
1523
- return error("object %s is not a blob", sha1_to_hex(sha1));
1533
+ return error(_("object %s is not a blob"), sha1_to_hex(sha1));
1534
}
1535
strbuf_attach(dst, buf, size, size + 1);
1536
return 0;
@@ -1568,7 +1578,7 @@ static void handle_modify_delete(struct merge_options *o,
1578
o_sha, o_mode,
1579
a_sha, a_mode,
1580
b_sha, b_mode,
1571
- "modify", "modified");
1581
+ _("modify"), _("modified"));
1582
}
1583
1584
static int merge_content(struct merge_options *o,
@@ -1578,14 +1588,14 @@ static int merge_content(struct merge_options *o,
1588
unsigned char *b_sha, int b_mode,
1589
struct rename_conflict_info *rename_conflict_info)
1590
{
1581
- const char *reason = "content";
1591
+ const char *reason = _("content");
1592
const char *path1 = NULL, *path2 = NULL;
1593
struct merge_file_info mfi;
1594
struct diff_filespec one, a, b;
1595
unsigned df_conflict_remains = 0;
1596
1597
if (!o_sha) {
1588
- reason = "add/add";
1598
+ reason = _("add/add");
1599
o_sha = (unsigned char *)null_sha1;
1600
}
1601
one.path = a.path = b.path = (char *)path;
@@ -1619,7 +1629,7 @@ static int merge_content(struct merge_options *o,
1629
if (mfi.clean && !df_conflict_remains &&
1630
sha_eq(mfi.sha, a_sha) && mfi.mode == a_mode) {
1631
int path_renamed_outside_HEAD;
1622
- output(o, 3, "Skipped %s (merged same as existing)", path);
1632
+ output(o, 3, _("Skipped %s (merged same as existing)"), path);
1633
/*
1634
* The content merge resulted in the same file contents we
1635
* already had. We can return early if those file contents
@@ -1633,12 +1643,12 @@ static int merge_content(struct merge_options *o,
1643
return mfi.clean;
1644
}
1645
} else
1636
- output(o, 2, "Auto-merging %s", path);
1646
+ output(o, 2, _("Auto-merging %s"), path);
1647
1648
if (!mfi.clean) {
1649
if (S_ISGITLINK(mfi.mode))
1640
- reason = "submodule";
1641
- output(o, 1, "CONFLICT (%s): Merge conflict in %s",
1650
+ reason = _("submodule");
1651
+ output(o, 1, _("CONFLICT (%s): Merge conflict in %s"),
1652
reason, path);
1653
if (rename_conflict_info && !df_conflict_remains)
1654
update_stages(path, &one, &a, &b);
@@ -1664,7 +1674,7 @@ static int merge_content(struct merge_options *o,
1674
1675
}
1676
new_path = unique_path(o, path, rename_conflict_info->branch1);
1667
- output(o, 1, "Adding as %s instead", new_path);
1677
+ output(o, 1, _("Adding as %s instead"), new_path);
1678
update_file(o, 0, mfi.sha, mfi.mode, new_path);
1679
free(new_path);
1680
mfi.clean = 0;
@@ -1728,7 +1738,7 @@ static int process_entry(struct merge_options *o,
1738
/* Deleted in both or deleted in one and
1739
* unchanged in the other */
1740
if (a_sha)
1731
- output(o, 2, "Removing %s", path);
1741
+ output(o, 2, _("Removing %s"), path);
1742
/* do not touch working file if it did not exist */
1743
remove_file(o, 1, path, !a_sha);
1744
} else {
@@ -1753,19 +1763,19 @@ static int process_entry(struct merge_options *o,
1763
other_branch = o->branch2;
1764
mode = a_mode;
1765
sha = a_sha;
1756
- conf = "file/directory";
1766
+ conf = _("file/directory");
1767
} else {
1768
add_branch = o->branch2;
1769
other_branch = o->branch1;
1770
mode = b_mode;
1771
sha = b_sha;
1762
- conf = "directory/file";
1772
+ conf = _("directory/file");
1773
}
1774
if (dir_in_way(path, !o->call_depth)) {
1775
char *new_path = unique_path(o, path, add_branch);
1776
clean_merge = 0;
1767
- output(o, 1, "CONFLICT (%s): There is a directory with name %s in %s. "
1768
- "Adding %s as %s",
1777
+ output(o, 1, _("CONFLICT (%s): There is a directory with name %s in %s. "
1778
+ "Adding %s as %s"),
1779
conf, path, other_branch, path, new_path);
1780
if (o->call_depth)
1781
remove_file_from_cache(path);
@@ -1774,7 +1784,7 @@ static int process_entry(struct merge_options *o,
1784
remove_file_from_cache(path);
1785
free(new_path);
1786
} else {
1777
- output(o, 2, "Adding %s", path);
1787
+ output(o, 2, _("Adding %s"), path);
1788
/* do not overwrite file if already present */
1789
update_file_flags(o, sha, mode, path, 1, !a_sha);
1790
}
@@ -1791,7 +1801,7 @@ static int process_entry(struct merge_options *o,
1801
*/
1802
remove_file(o, 1, path, !a_mode);
1803
} else
1794
- die("Fatal merge failure, shouldn't happen.");
1804
+ die(_("Fatal merge failure, shouldn't happen."));
1805
1806
return clean_merge;
1807
}
@@ -1810,7 +1820,7 @@ int merge_trees(struct merge_options *o,
1820
}
1821
1822
if (sha_eq(common->object.sha1, merge->object.sha1)) {
1813
- output(o, 0, "Already up-to-date!");
1823
+ output(o, 0, _("Already up-to-date!"));
1824
*result = head;
1825
return 1;
1826
}
@@ -1819,7 +1829,7 @@ int merge_trees(struct merge_options *o,
1829
1830
if (code != 0) {
1831
if (show(o, 4) || o->call_depth)
1822
- die("merging of trees %s and %s failed",
1832
+ die(_("merging of trees %s and %s failed"),
1833
sha1_to_hex(head->object.sha1),
1834
sha1_to_hex(merge->object.sha1));
1835
else
@@ -1849,7 +1859,7 @@ int merge_trees(struct merge_options *o,
1859
for (i = 0; i < entries->nr; i++) {
1860
struct stage_data *e = entries->items[i].util;
1861
if (!e->processed)
1852
- die("Unprocessed path??? %s",
1862
+ die(_("Unprocessed path??? %s"),
1863
entries->items[i].string);
1864
}
1865
@@ -1894,7 +1904,7 @@ int merge_recursive(struct merge_options *o,
1904
int clean;
1905
1906
if (show(o, 4)) {
1897
- output(o, 4, "Merging:");
1907
+ output(o, 4, _("Merging:"));
1908
output_commit_title(o, h1);
1909
output_commit_title(o, h2);
1910
}
@@ -1905,7 +1915,7 @@ int merge_recursive(struct merge_options *o,
1915
}
1916
1917
if (show(o, 5)) {
1908
- output(o, 5, "found %u common ancestor(s):", commit_list_count(ca));
1918
+ output(o, 5, _("found %u common ancestor(s):"), commit_list_count(ca));
1919
for (iter = ca; iter; iter = iter->next)
1920
output_commit_title(o, iter->item);
1921
}
@@ -1941,7 +1951,7 @@ int merge_recursive(struct merge_options *o,
1951
o->call_depth--;
1952
1953
if (!merged_common_ancestors)
1944
- die("merge returned no commit");
1954
+ die(_("merge returned no commit"));
1955
}
1956
1957
discard_cache();
@@ -1998,7 +2008,7 @@ int merge_recursive_generic(struct merge_options *o,
2008
for (i = 0; i < num_base_list; ++i) {
2009
struct commit *base;
2010
if (!(base = get_ref(base_list[i], sha1_to_hex(base_list[i]))))
2001
- return error("Could not parse object '%s'",
2011
+ return error(_("Could not parse object '%s'"),
2012
sha1_to_hex(base_list[i]));
2013
commit_list_insert(base, &ca);
2014
}
@@ -2010,7 +2020,7 @@ int merge_recursive_generic(struct merge_options *o,
2020
if (active_cache_changed &&
2021
(write_cache(index_fd, active_cache, active_nr) ||
2022
commit_locked_index(lock)))
2013
- return error("Unable to write index.");
2023
+ return error(_("Unable to write index."));
2024
2025
return clean ? 0 : 1;
2026
}
t/t6022-merge-rename.sh
+8
-8
@@ -242,10 +242,10 @@ test_expect_success 'merge of identical changes in a renamed file' '
242
rm -f A M N &&
243
git reset --hard &&
244
git checkout change+rename &&
245
- GIT_MERGE_VERBOSITY=3 git merge change | grep "^Skipped B" &&
245
+ GIT_MERGE_VERBOSITY=3 git merge change | test_i18ngrep "^Skipped B" &&
246
git reset --hard HEAD^ &&
247
git checkout change &&
248
- GIT_MERGE_VERBOSITY=3 git merge change+rename | grep "^Skipped B"
248
+ GIT_MERGE_VERBOSITY=3 git merge change+rename | test_i18ngrep "^Skipped B"
249
'
250
251
test_expect_success 'setup for rename + d/f conflicts' '
@@ -303,9 +303,9 @@ test_expect_success 'Rename+D/F conflict; renamed file merges but dir in way' '
303
git checkout -q renamed-file-has-no-conflicts^0 &&
304
test_must_fail git merge --strategy=recursive dir-in-way >output &&
305
306
- grep "CONFLICT (modify/delete): dir/file-in-the-way" output &&
307
- grep "Auto-merging dir" output &&
308
- grep "Adding as dir~HEAD instead" output &&
306
+ test_i18ngrep "CONFLICT (modify/delete): dir/file-in-the-way" output &&
307
+ test_i18ngrep "Auto-merging dir" output &&
308
+ test_i18ngrep "Adding as dir~HEAD instead" output &&
309
310
test 3 -eq "$(git ls-files -u | wc -l)" &&
311
test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
@@ -325,9 +325,9 @@ test_expect_success 'Same as previous, but merged other way' '
325
test_must_fail git merge --strategy=recursive renamed-file-has-no-conflicts >output 2>errors &&
326
327
! grep "error: refusing to lose untracked file at" errors &&
328
- grep "CONFLICT (modify/delete): dir/file-in-the-way" output &&
329
- grep "Auto-merging dir" output &&
330
- grep "Adding as dir~renamed-file-has-no-conflicts instead" output &&
328
+ test_i18ngrep "CONFLICT (modify/delete): dir/file-in-the-way" output &&
329
+ test_i18ngrep "Auto-merging dir" output &&
330
+ test_i18ngrep "Adding as dir~renamed-file-has-no-conflicts instead" output &&
331
332
test 3 -eq "$(git ls-files -u | wc -l)" &&
333
test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
t/t6042-merge-rename-corner-cases.sh
+1
-1
@@ -380,7 +380,7 @@ test_expect_success 'handle rename/rename (2to1) conflict correctly' '
380
git checkout B^0 &&
381
382
test_must_fail git merge -s recursive C^0 >out &&
383
- grep "CONFLICT (rename/rename)" out &&
383
+ test_i18ngrep "CONFLICT (rename/rename)" out &&
384
385
test 2 -eq $(git ls-files -s | wc -l) &&
386
test 2 -eq $(git ls-files -u | wc -l) &&