fsck: mark strings for translation
Two die() are updated to start with lowercase to be consistent with the rest. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Nov 10, 2018 at 06:16 UTC
674ba34038568e36090c6c4c616a3266c8b6459e
5 files changed
+90
-82
builtin/fsck.c
+57
-49
@@ -85,7 +85,7 @@ static const char *printable_type(struct object *obj)
85
86
ret = type_name(obj->type);
87
if (!ret)
88
- ret = "unknown";
88
+ ret = _("unknown");
89
90
return ret;
91
}
@@ -116,7 +116,8 @@ static int fsck_config(const char *var, const char *value, void *cb)
116
static int objerror(struct object *obj, const char *err)
117
{
118
errors_found |= ERROR_OBJECT;
119
- fprintf_ln(stderr, "error in %s %s: %s",
119
+ /* TRANSLATORS: e.g. error in tree 01bfda: <more explanation> */
120
+ fprintf_ln(stderr, _("error in %s %s: %s"),
121
printable_type(obj), describe_object(obj), err);
122
return -1;
123
}
@@ -126,11 +127,13 @@ static int fsck_error_func(struct fsck_options *o,
127
{
128
switch (type) {
129
case FSCK_WARN:
129
- fprintf_ln(stderr, "warning in %s %s: %s",
130
+ /* TRANSLATORS: e.g. warning in tree 01bfda: <more explanation> */
131
+ fprintf_ln(stderr, _("warning in %s %s: %s"),
132
printable_type(obj), describe_object(obj), message);
133
return 0;
134
case FSCK_ERROR:
133
- fprintf_ln(stderr, "error in %s %s: %s",
135
+ /* TRANSLATORS: e.g. error in tree 01bfda: <more explanation> */
136
+ fprintf_ln(stderr, _("error in %s %s: %s"),
137
printable_type(obj), describe_object(obj), message);
138
return 1;
139
default:
@@ -151,17 +154,18 @@ static int mark_object(struct object *obj, int type, void *data, struct fsck_opt
154
*/
155
if (!obj) {
156
/* ... these references to parent->fld are safe here */
154
- printf("broken link from %7s %s\n",
155
- printable_type(parent), describe_object(parent));
156
- printf("broken link from %7s %s\n",
157
- (type == OBJ_ANY ? "unknown" : type_name(type)), "unknown");
157
+ printf_ln(_("broken link from %7s %s"),
158
+ printable_type(parent), describe_object(parent));
159
+ printf_ln(_("broken link from %7s %s"),
160
+ (type == OBJ_ANY ? _("unknown") : type_name(type)),
161
+ _("unknown"));
162
errors_found |= ERROR_REACHABLE;
163
return 1;
164
}
165
166
if (type != OBJ_ANY && obj->type != type)
167
/* ... and the reference to parent is safe here */
164
- objerror(parent, "wrong object type in link");
168
+ objerror(parent, _("wrong object type in link"));
169
170
if (obj->flags & REACHABLE)
171
return 0;
@@ -177,8 +181,8 @@ static int mark_object(struct object *obj, int type, void *data, struct fsck_opt
181
182
if (!(obj->flags & HAS_OBJ)) {
183
if (parent && !has_object_file(&obj->oid)) {
180
- printf_ln("broken link from %7s %s\n"
181
- " to %7s %s",
184
+ printf_ln(_("broken link from %7s %s\n"
185
+ " to %7s %s"),
186
printable_type(parent),
187
describe_object(parent),
188
printable_type(obj),
@@ -246,8 +250,8 @@ static void check_reachable_object(struct object *obj)
250
return;
251
if (has_object_pack(&obj->oid))
252
return; /* it is in pack - forget about it */
249
- printf("missing %s %s\n", printable_type(obj),
250
- describe_object(obj));
253
+ printf_ln(_("missing %s %s"), printable_type(obj),
254
+ describe_object(obj));
255
errors_found |= ERROR_REACHABLE;
256
return;
257
}
@@ -272,8 +276,8 @@ static void check_unreachable_object(struct object *obj)
276
* since this is something that is prunable.
277
*/
278
if (show_unreachable) {
275
- printf("unreachable %s %s\n", printable_type(obj),
276
- describe_object(obj));
279
+ printf_ln(_("unreachable %s %s"), printable_type(obj),
280
+ describe_object(obj));
281
return;
282
}
283
@@ -291,8 +295,8 @@ static void check_unreachable_object(struct object *obj)
295
*/
296
if (!(obj->flags & USED)) {
297
if (show_dangling)
294
- printf("dangling %s %s\n", printable_type(obj),
295
- describe_object(obj));
298
+ printf_ln(_("dangling %s %s"), printable_type(obj),
299
+ describe_object(obj));
300
if (write_lost_and_found) {
301
char *filename = git_pathdup("lost-found/%s/%s",
302
obj->type == OBJ_COMMIT ? "commit" : "other",
@@ -300,18 +304,18 @@ static void check_unreachable_object(struct object *obj)
304
FILE *f;
305
306
if (safe_create_leading_directories_const(filename)) {
303
- error("Could not create lost-found");
307
+ error(_("could not create lost-found"));
308
free(filename);
309
return;
310
}
311
f = xfopen(filename, "w");
312
if (obj->type == OBJ_BLOB) {
313
if (stream_blob_to_fd(fileno(f), &obj->oid, NULL, 1))
310
- die_errno("Could not write '%s'", filename);
314
+ die_errno(_("could not write '%s'"), filename);
315
} else
316
fprintf(f, "%s\n", describe_object(obj));
317
if (fclose(f))
314
- die_errno("Could not finish '%s'",
318
+ die_errno(_("could not finish '%s'"),
319
filename);
320
free(filename);
321
}
@@ -328,7 +332,7 @@ static void check_unreachable_object(struct object *obj)
332
static void check_object(struct object *obj)
333
{
334
if (verbose)
331
- fprintf(stderr, "Checking %s\n", describe_object(obj));
335
+ fprintf_ln(stderr, _("Checking %s"), describe_object(obj));
336
337
if (obj->flags & REACHABLE)
338
check_reachable_object(obj);
@@ -346,7 +350,7 @@ static void check_connectivity(void)
350
/* Look up all the requirements, warn about missing objects.. */
351
max = get_max_object_index();
352
if (verbose)
349
- fprintf(stderr, "Checking connectivity (%d objects)\n", max);
353
+ fprintf_ln(stderr, _("Checking connectivity (%d objects)"), max);
354
355
for (i = 0; i < max; i++) {
356
struct object *obj = get_indexed_object(i);
@@ -365,11 +369,11 @@ static int fsck_obj(struct object *obj, void *buffer, unsigned long size)
369
obj->flags |= SEEN;
370
371
if (verbose)
368
- fprintf(stderr, "Checking %s %s\n",
369
- printable_type(obj), describe_object(obj));
372
+ fprintf_ln(stderr, _("Checking %s %s"),
373
+ printable_type(obj), describe_object(obj));
374
375
if (fsck_walk(obj, NULL, &fsck_obj_options))
372
- objerror(obj, "broken links");
376
+ objerror(obj, _("broken links"));
377
err = fsck_object(obj, buffer, size, &fsck_obj_options);
378
if (err)
379
goto out;
@@ -378,14 +382,15 @@ static int fsck_obj(struct object *obj, void *buffer, unsigned long size)
382
struct commit *commit = (struct commit *) obj;
383
384
if (!commit->parents && show_root)
381
- printf("root %s\n", describe_object(&commit->object));
385
+ printf_ln(_("root %s"),
386
+ describe_object(&commit->object));
387
}
388
389
if (obj->type == OBJ_TAG) {
390
struct tag *tag = (struct tag *) obj;
391
392
if (show_tags && tag->tagged) {
388
- printf_ln("tagged %s %s (%s) in %s",
393
+ printf_ln(_("tagged %s %s (%s) in %s"),
394
printable_type(tag->tagged),
395
describe_object(tag->tagged),
396
tag->tag,
@@ -413,7 +418,8 @@ static int fsck_obj_buffer(const struct object_id *oid, enum object_type type,
418
eaten);
419
if (!obj) {
420
errors_found |= ERROR_OBJECT;
416
- return error("%s: object corrupt or missing", oid_to_hex(oid));
421
+ return error(_("%s: object corrupt or missing"),
422
+ oid_to_hex(oid));
423
}
424
obj->flags &= ~(REACHABLE | SEEN);
425
obj->flags |= HAS_OBJ;
@@ -437,7 +443,8 @@ static void fsck_handle_reflog_oid(const char *refname, struct object_id *oid,
443
obj->flags |= USED;
444
mark_object_reachable(obj);
445
} else if (!is_promisor_object(oid)) {
440
- error("%s: invalid reflog entry %s", refname, oid_to_hex(oid));
446
+ error(_("%s: invalid reflog entry %s"),
447
+ refname, oid_to_hex(oid));
448
errors_found |= ERROR_REACHABLE;
449
}
450
}
@@ -450,8 +457,8 @@ static int fsck_handle_reflog_ent(struct object_id *ooid, struct object_id *noid
457
const char *refname = cb_data;
458
459
if (verbose)
453
- fprintf(stderr, "Checking reflog %s->%s\n",
454
- oid_to_hex(ooid), oid_to_hex(noid));
460
+ fprintf_ln(stderr, _("Checking reflog %s->%s"),
461
+ oid_to_hex(ooid), oid_to_hex(noid));
462
463
fsck_handle_reflog_oid(refname, ooid, 0);
464
fsck_handle_reflog_oid(refname, noid, timestamp);
@@ -480,13 +487,14 @@ static int fsck_handle_ref(const char *refname, const struct object_id *oid,
487
default_refs++;
488
return 0;
489
}
483
- error("%s: invalid sha1 pointer %s", refname, oid_to_hex(oid));
490
+ error(_("%s: invalid sha1 pointer %s"),
491
+ refname, oid_to_hex(oid));
492
errors_found |= ERROR_REACHABLE;
493
/* We'll continue with the rest despite the error.. */
494
return 0;
495
}
496
if (obj->type != OBJ_COMMIT && is_branch(refname)) {
489
- error("%s: not a commit", refname);
497
+ error(_("%s: not a commit"), refname);
498
errors_found |= ERROR_REFS;
499
}
500
default_refs++;
@@ -520,7 +528,7 @@ static void get_default_heads(void)
528
* "show_unreachable" flag.
529
*/
530
if (!default_refs) {
523
- fprintf(stderr, "notice: No default references\n");
531
+ fprintf_ln(stderr, _("notice: No default references"));
532
show_unreachable = 0;
533
}
534
}
@@ -535,7 +543,7 @@ static int fsck_loose(const struct object_id *oid, const char *path, void *data)
543
544
if (read_loose_object(path, oid, &type, &size, &contents) < 0) {
545
errors_found |= ERROR_OBJECT;
538
- error("%s: object corrupt or missing: %s",
546
+ error(_("%s: object corrupt or missing: %s"),
547
oid_to_hex(oid), path);
548
return 0; /* keep checking other objects */
549
}
@@ -548,7 +556,7 @@ static int fsck_loose(const struct object_id *oid, const char *path, void *data)
556
557
if (!obj) {
558
errors_found |= ERROR_OBJECT;
551
- error("%s: object could not be parsed: %s",
559
+ error(_("%s: object could not be parsed: %s"),
560
oid_to_hex(oid), path);
561
if (!eaten)
562
free(contents);
@@ -568,7 +576,7 @@ static int fsck_loose(const struct object_id *oid, const char *path, void *data)
576
static int fsck_cruft(const char *basename, const char *path, void *data)
577
{
578
if (!starts_with(basename, "tmp_obj_"))
571
- fprintf(stderr, "bad sha1 file: %s\n", path);
579
+ fprintf_ln(stderr, _("bad sha1 file: %s"), path);
580
return 0;
581
}
582
@@ -583,7 +591,7 @@ static void fsck_object_dir(const char *path)
591
struct progress *progress = NULL;
592
593
if (verbose)
586
- fprintf(stderr, "Checking object directory\n");
594
+ fprintf_ln(stderr, _("Checking object directory"));
595
596
if (show_progress)
597
progress = start_progress(_("Checking object directories"), 256);
@@ -599,28 +607,28 @@ static int fsck_head_link(void)
607
int null_is_error = 0;
608
609
if (verbose)
602
- fprintf(stderr, "Checking HEAD link\n");
610
+ fprintf_ln(stderr, _("Checking HEAD link"));
611
612
head_points_at = resolve_ref_unsafe("HEAD", 0, &head_oid, NULL);
613
if (!head_points_at) {
614
errors_found |= ERROR_REFS;
607
- return error("Invalid HEAD");
615
+ return error(_("invalid HEAD"));
616
}
617
if (!strcmp(head_points_at, "HEAD"))
618
/* detached HEAD */
619
null_is_error = 1;
620
else if (!starts_with(head_points_at, "refs/heads/")) {
621
errors_found |= ERROR_REFS;
614
- return error("HEAD points to something strange (%s)",
622
+ return error(_("HEAD points to something strange (%s)"),
623
head_points_at);
624
}
625
if (is_null_oid(&head_oid)) {
626
if (null_is_error) {
627
errors_found |= ERROR_REFS;
620
- return error("HEAD: detached HEAD points at nothing");
628
+ return error(_("HEAD: detached HEAD points at nothing"));
629
}
622
- fprintf(stderr, "notice: HEAD points to an unborn branch (%s)\n",
623
- head_points_at + 11);
630
+ fprintf_ln(stderr, _("notice: HEAD points to an unborn branch (%s)"),
631
+ head_points_at + 11);
632
}
633
return 0;
634
}
@@ -631,12 +639,12 @@ static int fsck_cache_tree(struct cache_tree *it)
639
int err = 0;
640
641
if (verbose)
634
- fprintf(stderr, "Checking cache tree\n");
642
+ fprintf_ln(stderr, _("Checking cache tree"));
643
644
if (0 <= it->entry_count) {
645
struct object *obj = parse_object(the_repository, &it->oid);
646
if (!obj) {
639
- error("%s: invalid sha1 pointer in cache-tree",
647
+ error(_("%s: invalid sha1 pointer in cache-tree"),
648
oid_to_hex(&it->oid));
649
errors_found |= ERROR_REFS;
650
return 1;
@@ -647,7 +655,7 @@ static int fsck_cache_tree(struct cache_tree *it)
655
obj, xstrdup(":"));
656
mark_object_reachable(obj);
657
if (obj->type != OBJ_TREE)
650
- err |= objerror(obj, "non-tree in cache-tree");
658
+ err |= objerror(obj, _("non-tree in cache-tree"));
659
}
660
for (i = 0; i < it->subtree_nr; i++)
661
err |= fsck_cache_tree(it->down[i]->cache_tree);
@@ -789,7 +797,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
797
if (!obj || !(obj->flags & HAS_OBJ)) {
798
if (is_promisor_object(&oid))
799
continue;
792
- error("%s: object missing", oid_to_hex(&oid));
800
+ error(_("%s: object missing"), oid_to_hex(&oid));
801
errors_found |= ERROR_OBJECT;
802
continue;
803
}
@@ -801,7 +809,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
809
mark_object_reachable(obj);
810
continue;
811
}
804
- error("invalid parameter: expected sha1, got '%s'", arg);
812
+ error(_("invalid parameter: expected sha1, got '%s'"), arg);
813
errors_found |= ERROR_OBJECT;
814
}
815
t/t1410-reflog.sh
+3
-3
@@ -20,12 +20,12 @@ check_have () {
20
}
21
22
check_fsck () {
23
- output=$(git fsck --full)
23
+ git fsck --full >fsck.output
24
case "$1" in
25
'')
26
- test -z "$output" ;;
26
+ test_must_be_empty fsck.output ;;
27
*)
28
- echo "$output" | grep "$1" ;;
28
+ test_i18ngrep "$1" fsck.output ;;
29
esac
30
}
31
t/t1450-fsck.sh
+25
-25
@@ -70,7 +70,7 @@ test_expect_success 'object with bad sha1' '
70
71
test_must_fail git fsck 2>out &&
72
cat out &&
73
- grep "$sha.*corrupt" out
73
+ test_i18ngrep "$sha.*corrupt" out
74
'
75
76
test_expect_success 'branch pointing to non-commit' '
@@ -78,7 +78,7 @@ test_expect_success 'branch pointing to non-commit' '
78
test_when_finished "git update-ref -d refs/heads/invalid" &&
79
test_must_fail git fsck 2>out &&
80
cat out &&
81
- grep "not a commit" out
81
+ test_i18ngrep "not a commit" out
82
'
83
84
test_expect_success 'HEAD link pointing at a funny object' '
@@ -88,7 +88,7 @@ test_expect_success 'HEAD link pointing at a funny object' '
88
# avoid corrupt/broken HEAD from interfering with repo discovery
89
test_must_fail env GIT_DIR=.git git fsck 2>out &&
90
cat out &&
91
- grep "detached HEAD points" out
91
+ test_i18ngrep "detached HEAD points" out
92
'
93
94
test_expect_success 'HEAD link pointing at a funny place' '
@@ -98,7 +98,7 @@ test_expect_success 'HEAD link pointing at a funny place' '
98
# avoid corrupt/broken HEAD from interfering with repo discovery
99
test_must_fail env GIT_DIR=.git git fsck 2>out &&
100
cat out &&
101
- grep "HEAD points to something strange" out
101
+ test_i18ngrep "HEAD points to something strange" out
102
'
103
104
test_expect_success 'email without @ is okay' '
@@ -122,7 +122,7 @@ test_expect_success 'email with embedded > is not okay' '
122
test_when_finished "git update-ref -d refs/heads/bogus" &&
123
test_must_fail git fsck 2>out &&
124
cat out &&
125
- grep "error in commit $new" out
125
+ test_i18ngrep "error in commit $new" out
126
'
127
128
test_expect_success 'missing < email delimiter is reported nicely' '
@@ -134,7 +134,7 @@ test_expect_success 'missing < email delimiter is reported nicely' '
134
test_when_finished "git update-ref -d refs/heads/bogus" &&
135
test_must_fail git fsck 2>out &&
136
cat out &&
137
- grep "error in commit $new.* - bad name" out
137
+ test_i18ngrep "error in commit $new.* - bad name" out
138
'
139
140
test_expect_success 'missing email is reported nicely' '
@@ -146,7 +146,7 @@ test_expect_success 'missing email is reported nicely' '
146
test_when_finished "git update-ref -d refs/heads/bogus" &&
147
test_must_fail git fsck 2>out &&
148
cat out &&
149
- grep "error in commit $new.* - missing email" out
149
+ test_i18ngrep "error in commit $new.* - missing email" out
150
'
151
152
test_expect_success '> in name is reported' '
@@ -158,7 +158,7 @@ test_expect_success '> in name is reported' '
158
test_when_finished "git update-ref -d refs/heads/bogus" &&
159
test_must_fail git fsck 2>out &&
160
cat out &&
161
- grep "error in commit $new" out
161
+ test_i18ngrep "error in commit $new" out
162
'
163
164
# date is 2^64 + 1
@@ -172,7 +172,7 @@ test_expect_success 'integer overflow in timestamps is reported' '
172
test_when_finished "git update-ref -d refs/heads/bogus" &&
173
test_must_fail git fsck 2>out &&
174
cat out &&
175
- grep "error in commit $new.*integer overflow" out
175
+ test_i18ngrep "error in commit $new.*integer overflow" out
176
'
177
178
test_expect_success 'commit with NUL in header' '
@@ -184,7 +184,7 @@ test_expect_success 'commit with NUL in header' '
184
test_when_finished "git update-ref -d refs/heads/bogus" &&
185
test_must_fail git fsck 2>out &&
186
cat out &&
187
- grep "error in commit $new.*unterminated header: NUL at offset" out
187
+ test_i18ngrep "error in commit $new.*unterminated header: NUL at offset" out
188
'
189
190
test_expect_success 'tree object with duplicate entries' '
@@ -205,7 +205,7 @@ test_expect_success 'tree object with duplicate entries' '
205
git hash-object -w -t tree --stdin
206
) &&
207
test_must_fail git fsck 2>out &&
208
- grep "error in tree .*contains duplicate file entries" out
208
+ test_i18ngrep "error in tree .*contains duplicate file entries" out
209
'
210
211
test_expect_success 'unparseable tree object' '
@@ -259,7 +259,7 @@ test_expect_success 'tag pointing to nonexistent' '
259
test_when_finished "git update-ref -d refs/tags/invalid" &&
260
test_must_fail git fsck --tags >out &&
261
cat out &&
262
- grep "broken link" out
262
+ test_i18ngrep "broken link" out
263
'
264
265
test_expect_success 'tag pointing to something else than its type' '
@@ -301,7 +301,7 @@ test_expect_success 'tag with incorrect tag name & missing tagger' '
301
warning in tag $tag: badTagName: invalid '\''tag'\'' name: wrong name format
302
warning in tag $tag: missingTaggerEntry: invalid format - expected '\''tagger'\'' line
303
EOF
304
- test_cmp expect out
304
+ test_i18ncmp expect out
305
'
306
307
test_expect_success 'tag with bad tagger' '
@@ -320,7 +320,7 @@ test_expect_success 'tag with bad tagger' '
320
echo $tag >.git/refs/tags/wrong &&
321
test_when_finished "git update-ref -d refs/tags/wrong" &&
322
test_must_fail git fsck --tags 2>out &&
323
- grep "error in tag .*: invalid author/committer" out
323
+ test_i18ngrep "error in tag .*: invalid author/committer" out
324
'
325
326
test_expect_success 'tag with NUL in header' '
@@ -340,7 +340,7 @@ test_expect_success 'tag with NUL in header' '
340
test_when_finished "git update-ref -d refs/tags/wrong" &&
341
test_must_fail git fsck --tags 2>out &&
342
cat out &&
343
- grep "error in tag $tag.*unterminated header: NUL at offset" out
343
+ test_i18ngrep "error in tag $tag.*unterminated header: NUL at offset" out
344
'
345
346
test_expect_success 'cleaned up' '
@@ -396,7 +396,7 @@ test_expect_success 'fsck notices blob entry pointing to null sha1' '
396
git hash-object -w --stdin -t tree) &&
397
git fsck 2>out &&
398
cat out &&
399
- grep "warning.*null sha1" out
399
+ test_i18ngrep "warning.*null sha1" out
400
)
401
'
402
@@ -407,7 +407,7 @@ test_expect_success 'fsck notices submodule entry pointing to null sha1' '
407
git hash-object -w --stdin -t tree) &&
408
git fsck 2>out &&
409
cat out &&
410
- grep "warning.*null sha1" out
410
+ test_i18ngrep "warning.*null sha1" out
411
)
412
'
413
@@ -428,7 +428,7 @@ while read name path pretty; do
428
bad_tree=$(git mktree <bad) &&
429
git fsck 2>out &&
430
cat out &&
431
- grep "warning.*tree $bad_tree" out
431
+ test_i18ngrep "warning.*tree $bad_tree" out
432
)'
433
done <<-\EOF
434
100644 blob
@@ -474,9 +474,9 @@ test_expect_success 'NUL in commit' '
474
git branch bad $(cat name) &&
475
476
test_must_fail git -c fsck.nulInCommit=error fsck 2>warn.1 &&
477
- grep nulInCommit warn.1 &&
477
+ test_i18ngrep nulInCommit warn.1 &&
478
git fsck 2>warn.2 &&
479
- grep nulInCommit warn.2
479
+ test_i18ngrep nulInCommit warn.2
480
)
481
'
482
@@ -594,7 +594,7 @@ test_expect_success 'fsck --name-objects' '
594
remove_object $(git rev-parse julius:caesar.t) &&
595
test_must_fail git fsck --name-objects >out &&
596
tree=$(git rev-parse --verify julius:) &&
597
- egrep "$tree \((refs/heads/master|HEAD)@\{[0-9]*\}:" out
597
+ test_i18ngrep -E "$tree \((refs/heads/master|HEAD)@\{[0-9]*\}:" out
598
)
599
'
600
@@ -605,7 +605,7 @@ test_expect_success 'alternate objects are correctly blamed' '
605
mkdir alt.git/objects/12 &&
606
>alt.git/objects/12/34567890123456789012345678901234567890 &&
607
test_must_fail git fsck >out 2>&1 &&
608
- grep alt.git out
608
+ test_i18ngrep alt.git out
609
'
610
611
test_expect_success 'fsck errors in packed objects' '
@@ -624,8 +624,8 @@ test_expect_success 'fsck errors in packed objects' '
624
remove_object $one &&
625
remove_object $two &&
626
test_must_fail git fsck 2>out &&
627
- grep "error in commit $one.* - bad name" out &&
628
- grep "error in commit $two.* - bad name" out &&
627
+ test_i18ngrep "error in commit $one.* - bad name" out &&
628
+ test_i18ngrep "error in commit $two.* - bad name" out &&
629
! grep corrupt out
630
'
631
@@ -706,7 +706,7 @@ test_expect_success 'fsck notices dangling objects' '
706
git fsck >actual &&
707
# the output order is non-deterministic, as it comes from a hash
708
sort <actual >actual.sorted &&
709
- test_cmp expect actual.sorted
709
+ test_i18ncmp expect actual.sorted
710
)
711
'
712
t/t6050-replace.sh
+2
-2
@@ -133,8 +133,8 @@ test_expect_success 'tag replaced commit' '
133
134
test_expect_success '"git fsck" works' '
135
git fsck master >fsck_master.out &&
136
- grep "dangling commit $R" fsck_master.out &&
137
- grep "dangling tag $(cat .git/refs/tags/mytag)" fsck_master.out &&
136
+ test_i18ngrep "dangling commit $R" fsck_master.out &&
137
+ test_i18ngrep "dangling tag $(cat .git/refs/tags/mytag)" fsck_master.out &&
138
test -z "$(git fsck)"
139
'
140
t/t7415-submodule-names.sh
+3
-3
@@ -154,7 +154,7 @@ test_expect_success 'fsck detects symlinked .gitmodules file' '
154
# symlink detector; this grep string comes from the config
155
# variable name and will not be translated.
156
test_must_fail git fsck 2>output &&
157
- grep gitmodulesSymlink output
157
+ test_i18ngrep gitmodulesSymlink output
158
)
159
'
160
@@ -172,7 +172,7 @@ test_expect_success 'fsck detects non-blob .gitmodules' '
172
git ls-tree HEAD | sed s/subdir/.gitmodules/ | git mktree &&
173
174
test_must_fail git fsck 2>output &&
175
- grep gitmodulesBlob output
175
+ test_i18ngrep gitmodulesBlob output
176
)
177
'
178
@@ -186,7 +186,7 @@ test_expect_success 'fsck detects corrupt .gitmodules' '
186
git commit -m "broken gitmodules" &&
187
188
git fsck 2>output &&
189
- grep gitmodulesParse output &&
189
+ test_i18ngrep gitmodulesParse output &&
190
test_i18ngrep ! "bad config" output
191
)
192
'