summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f3027d)
raw | patch | inline | side by side (parent: 9f3027d)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Thu, 2 Sep 2010 18:26:27 +0000 (18:26 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:12:08 +0000 (07:12 +0000) |
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
builtin/mv.c | patch | blob | history |
diff --git a/builtin/mv.c b/builtin/mv.c
index cdbb09473c0c45efff23a63e78b7623cad523350..5d99973aaa90d40fa1a886687598d842108389ab 100644 (file)
--- a/builtin/mv.c
+++ b/builtin/mv.c
newfd = hold_locked_index(&lock_file, 1);
if (read_cache() < 0)
- die("index file corrupt");
+ die(_("index file corrupt"));
source = copy_pathspec(prefix, argv, argc, 0);
modes = xcalloc(argc, sizeof(enum update_mode));
const char *bad = NULL;
if (show_only)
- printf("Checking rename of '%s' to '%s'\n", src, dst);
+ printf(_("Checking rename of '%s' to '%s'\n"), src, dst);
length = strlen(src);
if (lstat(src, &st) < 0)
first = cache_name_pos(src_w_slash, len_w_slash);
if (first >= 0)
- die ("Huh? %.*s is in index?",
+ die (_("Huh? %.*s is in index?"),
len_w_slash, src_w_slash);
first = -1 - first;
* check both source and destination
*/
if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
- warning("%s; will overwrite!", bad);
+ warning(_("%s; will overwrite!"), bad);
bad = NULL;
} else
bad = "Cannot overwrite";
i--;
}
} else
- die ("%s, source=%s, destination=%s",
+ die (_("%s, source=%s, destination=%s"),
bad, src, dst);
}
}
enum update_mode mode = modes[i];
int pos;
if (show_only || verbose)
- printf("Renaming %s to %s\n", src, dst);
+ printf(_("Renaming %s to %s\n"), src, dst);
if (!show_only && mode != INDEX &&
rename(src, dst) < 0 && !ignore_errors)
- die_errno ("renaming '%s' failed", src);
+ die_errno (_("renaming '%s' failed"), src);
if (mode == WORKING_DIRECTORY)
continue;
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(&lock_file))
- die("Unable to write new index file");
+ die(_("Unable to write new index file"));
}
return 0;