i18n: git-clean basic messages
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c7c4efacf1
commit
2da57add28
@ -75,7 +75,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
|
|||||||
dir.flags |= DIR_SHOW_IGNORED;
|
dir.flags |= DIR_SHOW_IGNORED;
|
||||||
|
|
||||||
if (ignored && ignored_only)
|
if (ignored && ignored_only)
|
||||||
die("-x and -X cannot be used together");
|
die(_("-x and -X cannot be used together"));
|
||||||
|
|
||||||
if (!show_only && !force)
|
if (!show_only && !force)
|
||||||
die("clean.requireForce %s to true and neither -n nor -f given; "
|
die("clean.requireForce %s to true and neither -n nor -f given; "
|
||||||
@ -87,7 +87,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
|
|||||||
dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
|
dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
|
||||||
|
|
||||||
if (read_cache() < 0)
|
if (read_cache() < 0)
|
||||||
die("index file corrupt");
|
die(_("index file corrupt"));
|
||||||
|
|
||||||
if (!ignored)
|
if (!ignored)
|
||||||
setup_standard_excludes(&dir);
|
setup_standard_excludes(&dir);
|
||||||
@ -146,20 +146,20 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
|
|||||||
qname = quote_path_relative(directory.buf, directory.len, &buf, prefix);
|
qname = quote_path_relative(directory.buf, directory.len, &buf, prefix);
|
||||||
if (show_only && (remove_directories ||
|
if (show_only && (remove_directories ||
|
||||||
(matches == MATCHED_EXACTLY))) {
|
(matches == MATCHED_EXACTLY))) {
|
||||||
printf("Would remove %s\n", qname);
|
printf(_("Would remove %s\n"), qname);
|
||||||
} else if (remove_directories ||
|
} else if (remove_directories ||
|
||||||
(matches == MATCHED_EXACTLY)) {
|
(matches == MATCHED_EXACTLY)) {
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
printf("Removing %s\n", qname);
|
printf(_("Removing %s\n"), qname);
|
||||||
if (remove_dir_recursively(&directory,
|
if (remove_dir_recursively(&directory,
|
||||||
rm_flags) != 0) {
|
rm_flags) != 0) {
|
||||||
warning("failed to remove %s", qname);
|
warning(_("failed to remove %s"), qname);
|
||||||
errors++;
|
errors++;
|
||||||
}
|
}
|
||||||
} else if (show_only) {
|
} else if (show_only) {
|
||||||
printf("Would not remove %s\n", qname);
|
printf(_("Would not remove %s\n"), qname);
|
||||||
} else {
|
} else {
|
||||||
printf("Not removing %s\n", qname);
|
printf(_("Not removing %s\n"), qname);
|
||||||
}
|
}
|
||||||
strbuf_reset(&directory);
|
strbuf_reset(&directory);
|
||||||
} else {
|
} else {
|
||||||
@ -167,13 +167,13 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
|
|||||||
continue;
|
continue;
|
||||||
qname = quote_path_relative(ent->name, -1, &buf, prefix);
|
qname = quote_path_relative(ent->name, -1, &buf, prefix);
|
||||||
if (show_only) {
|
if (show_only) {
|
||||||
printf("Would remove %s\n", qname);
|
printf(_("Would remove %s\n"), qname);
|
||||||
continue;
|
continue;
|
||||||
} else if (!quiet) {
|
} else if (!quiet) {
|
||||||
printf("Removing %s\n", qname);
|
printf(_("Removing %s\n"), qname);
|
||||||
}
|
}
|
||||||
if (unlink(ent->name) != 0) {
|
if (unlink(ent->name) != 0) {
|
||||||
warning("failed to remove %s", qname);
|
warning(_("failed to remove %s"), qname);
|
||||||
errors++;
|
errors++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,13 +124,13 @@ cat >expected <<EOF
|
|||||||
Would remove expected
|
Would remove expected
|
||||||
Would remove result
|
Would remove result
|
||||||
EOF
|
EOF
|
||||||
test_expect_success 'git-clean, absent case' '
|
test_expect_success C_LOCALE_OUTPUT 'git-clean, absent case' '
|
||||||
setup_absent &&
|
setup_absent &&
|
||||||
git clean -n > result &&
|
git clean -n > result &&
|
||||||
test_cmp expected result
|
test_cmp expected result
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'git-clean, dirty case' '
|
test_expect_success C_LOCALE_OUTPUT 'git-clean, dirty case' '
|
||||||
setup_dirty &&
|
setup_dirty &&
|
||||||
git clean -n > result &&
|
git clean -n > result &&
|
||||||
test_cmp expected result
|
test_cmp expected result
|
||||||
|
@ -110,7 +110,7 @@ test_expect_success 'git clean with prefix' '
|
|||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'git clean with relative prefix' '
|
test_expect_success C_LOCALE_OUTPUT 'git clean with relative prefix' '
|
||||||
|
|
||||||
mkdir -p build docs &&
|
mkdir -p build docs &&
|
||||||
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
|
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
|
||||||
@ -125,7 +125,7 @@ test_expect_success 'git clean with relative prefix' '
|
|||||||
}
|
}
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'git clean with absolute path' '
|
test_expect_success C_LOCALE_OUTPUT 'git clean with absolute path' '
|
||||||
|
|
||||||
mkdir -p build docs &&
|
mkdir -p build docs &&
|
||||||
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
|
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
|
||||||
@ -377,7 +377,7 @@ test_expect_success 'clean.requireForce and -f' '
|
|||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'core.excludesfile' '
|
test_expect_success C_LOCALE_OUTPUT 'core.excludesfile' '
|
||||||
|
|
||||||
echo excludes >excludes &&
|
echo excludes >excludes &&
|
||||||
echo included >included &&
|
echo included >included &&
|
||||||
|
Loading…
Reference in New Issue
Block a user