summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c7c4efa)
raw | patch | inline | side by side (parent: c7c4efa)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 22 Feb 2011 23:42:21 +0000 (23:42 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Mar 2011 07:52:57 +0000 (23:52 -0800) |
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clean.c | patch | blob | history | |
t/t7012-skip-worktree-writing.sh | patch | blob | history | |
t/t7300-clean.sh | patch | blob | history |
diff --git a/builtin/clean.c b/builtin/clean.c
index 4a312abc6b3ecef5f174b2786ad31385ba058b44..2d0054be5859fbfbcdf59ad66e394430d8fe1d97 100644 (file)
--- a/builtin/clean.c
+++ b/builtin/clean.c
dir.flags |= DIR_SHOW_IGNORED;
if (ignored && ignored_only)
- die("-x and -X cannot be used together");
+ die(_("-x and -X cannot be used together"));
if (!show_only && !force)
die("clean.requireForce %s to true and neither -n nor -f given; "
dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
if (read_cache() < 0)
- die("index file corrupt");
+ die(_("index file corrupt"));
if (!ignored)
setup_standard_excludes(&dir);
qname = quote_path_relative(directory.buf, directory.len, &buf, prefix);
if (show_only && (remove_directories ||
(matches == MATCHED_EXACTLY))) {
- printf("Would remove %s\n", qname);
+ printf(_("Would remove %s\n"), qname);
} else if (remove_directories ||
(matches == MATCHED_EXACTLY)) {
if (!quiet)
- printf("Removing %s\n", qname);
+ printf(_("Removing %s\n"), qname);
if (remove_dir_recursively(&directory,
rm_flags) != 0) {
- warning("failed to remove %s", qname);
+ warning(_("failed to remove %s"), qname);
errors++;
}
} else if (show_only) {
- printf("Would not remove %s\n", qname);
+ printf(_("Would not remove %s\n"), qname);
} else {
- printf("Not removing %s\n", qname);
+ printf(_("Not removing %s\n"), qname);
}
strbuf_reset(&directory);
} else {
continue;
qname = quote_path_relative(ent->name, -1, &buf, prefix);
if (show_only) {
- printf("Would remove %s\n", qname);
+ printf(_("Would remove %s\n"), qname);
continue;
} else if (!quiet) {
- printf("Removing %s\n", qname);
+ printf(_("Removing %s\n"), qname);
}
if (unlink(ent->name) != 0) {
- warning("failed to remove %s", qname);
+ warning(_("failed to remove %s"), qname);
errors++;
}
}
index 582d0b54f1f1a32459727e59932e95c4b466951f..14fcb1c7f5d8366827bc6e3256f118a757d2e996 100755 (executable)
Would remove expected
Would remove result
EOF
-test_expect_success 'git-clean, absent case' '
+test_expect_success C_LOCALE_OUTPUT 'git-clean, absent case' '
setup_absent &&
git clean -n > result &&
test_cmp expected result
'
-test_expect_success 'git-clean, dirty case' '
+test_expect_success C_LOCALE_OUTPUT 'git-clean, dirty case' '
setup_dirty &&
git clean -n > result &&
test_cmp expected result
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index 02f67b73b762850f3c7f0faf0886bf4011f57308..7e1be444027621e1ea94b0b9ed0e129fce922b02 100755 (executable)
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
'
-test_expect_success 'git clean with relative prefix' '
+test_expect_success C_LOCALE_OUTPUT 'git clean with relative prefix' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
}
'
-test_expect_success 'git clean with absolute path' '
+test_expect_success C_LOCALE_OUTPUT 'git clean with absolute path' '
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
'
-test_expect_success 'core.excludesfile' '
+test_expect_success C_LOCALE_OUTPUT 'core.excludesfile' '
echo excludes >excludes &&
echo included >included &&