summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fc88e31)
raw | patch | inline | side by side (parent: fc88e31)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 22 Feb 2011 23:41:50 +0000 (23:41 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Mar 2011 07:52:54 +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/diff.c | patch | blob | history |
diff --git a/builtin/diff.c b/builtin/diff.c
index 42822cd5374dbcf0e63c17078a55284c432ddc77..00342730b651c89d38e3f8af14f350a1077ffde2 100644 (file)
--- a/builtin/diff.c
+++ b/builtin/diff.c
usage(builtin_diff_usage);
if (lstat(path, &st))
- die_errno("failed to stat '%s'", path);
+ die_errno(_("failed to stat '%s'"), path);
if (!(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)))
- die("'%s': not a regular file or symlink", path);
+ die(_("'%s': not a regular file or symlink"), path);
diff_set_mnemonic_prefix(&revs->diffopt, "o/", "w/");
@@ -222,7 +222,7 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
else if (!strcmp(argv[1], "-h"))
usage(builtin_diff_usage);
else
- return error("invalid option: %s", argv[1]);
+ return error(_("invalid option: %s"), argv[1]);
argv++; argc--;
}
DIFF_OPT_SET(&rev.diffopt, ALLOW_TEXTCONV);
if (nongit)
- die("Not a git repository");
+ die(_("Not a git repository"));
argc = setup_revisions(argc, argv, &rev, NULL);
if (!rev.diffopt.output_format) {
rev.diffopt.output_format = DIFF_FORMAT_PATCH;
if (diff_setup_done(&rev.diffopt) < 0)
- die("diff_setup_done failed");
+ die(_("diff_setup_done failed"));
}
DIFF_OPT_SET(&rev.diffopt, RECURSIVE);
obj = parse_object(obj->sha1);
obj = deref_tag(obj, NULL, 0);
if (!obj)
- die("invalid object '%s' given.", name);
+ die(_("invalid object '%s' given."), name);
if (obj->type == OBJ_COMMIT)
obj = &((struct commit *)obj)->tree->object;
if (obj->type == OBJ_TREE) {
if (ARRAY_SIZE(ent) <= ents)
- die("more than %d trees given: '%s'",
+ die(_("more than %d trees given: '%s'"),
(int) ARRAY_SIZE(ent), name);
obj->flags |= flags;
ent[ents].item = obj;
}
if (obj->type == OBJ_BLOB) {
if (2 <= blobs)
- die("more than two blobs given: '%s'", name);
+ die(_("more than two blobs given: '%s'"), name);
hashcpy(blob[blobs].sha1, obj->sha1);
blob[blobs].name = name;
blob[blobs].mode = list->mode;
continue;
}
- die("unhandled object '%s' given.", name);
+ die(_("unhandled object '%s' given."), name);
}
if (rev.prune_data) {
const char **pathspec = rev.prune_data;