Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
i18n: git-reset basic messages
author
Ævar Arnfjörð Bjarmason
<avarab@gmail.com>
Tue, 22 Feb 2011 23:42:06 +0000
(23:42 +0000)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 10 Mar 2011 07:52:56 +0000
(23:52 -0800)
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reset.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b9b537f
)
diff --git
a/builtin/reset.c
b/builtin/reset.c
index 5de2bceeec8c1d243ed6da70464d0c4dd60d7352..0823955d2261c2f9810a80f46143f4ca3c1c868a 100644
(file)
--- a/
builtin/reset.c
+++ b/
builtin/reset.c
@@
-92,20
+92,20
@@
static int reset_index_file(const unsigned char *sha1, int reset_type, int quiet
if (reset_type == KEEP) {
unsigned char head_sha1[20];
if (get_sha1("HEAD", head_sha1))
if (reset_type == KEEP) {
unsigned char head_sha1[20];
if (get_sha1("HEAD", head_sha1))
- return error(
"You do not have a valid HEAD."
);
+ return error(
_("You do not have a valid HEAD.")
);
if (!fill_tree_descriptor(desc, head_sha1))
if (!fill_tree_descriptor(desc, head_sha1))
- return error(
"Failed to find tree of HEAD."
);
+ return error(
_("Failed to find tree of HEAD.")
);
nr++;
opts.fn = twoway_merge;
}
if (!fill_tree_descriptor(desc + nr - 1, sha1))
nr++;
opts.fn = twoway_merge;
}
if (!fill_tree_descriptor(desc + nr - 1, sha1))
- return error(
"Failed to find tree of %s."
, sha1_to_hex(sha1));
+ return error(
_("Failed to find tree of %s.")
, sha1_to_hex(sha1));
if (unpack_trees(nr, desc, &opts))
return -1;
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(lock))
if (unpack_trees(nr, desc, &opts))
return -1;
if (write_cache(newfd, active_cache, active_nr) ||
commit_locked_index(lock))
- return error(
"Could not write new index file."
);
+ return error(
_("Could not write new index file.")
);
return 0;
}
return 0;
}
@@
-115,7
+115,7
@@
static void print_new_head_line(struct commit *commit)
const char *hex, *body;
hex = find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV);
const char *hex, *body;
hex = find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV);
- printf(
"HEAD is now at %s"
, hex);
+ printf(
_("HEAD is now at %s")
, hex);
body = strstr(commit->buffer, "\n\n");
if (body) {
const char *eol;
body = strstr(commit->buffer, "\n\n");
if (body) {
const char *eol;
@@
-139,7
+139,7
@@
static int update_index_refresh(int fd, struct lock_file *index_lock, int flags)
}
if (read_cache() < 0)
}
if (read_cache() < 0)
- return error(
"Could not read index"
);
+ return error(
_("Could not read index")
);
result = refresh_index(&the_index, (flags), NULL, NULL,
"Unstaged changes after reset:") ? 1 : 0;
result = refresh_index(&the_index, (flags), NULL, NULL,
"Unstaged changes after reset:") ? 1 : 0;
@@
-167,7
+167,7
@@
static void update_index_from_diff(struct diff_queue_struct *q,
ce = make_cache_entry(one->mode, one->sha1, one->path,
0, 0);
if (!ce)
ce = make_cache_entry(one->mode, one->sha1, one->path,
0, 0);
if (!ce)
- die(
"make_cache_entry failed for path '%s'"
,
+ die(
_("make_cache_entry failed for path '%s'")
,
one->path);
add_cache_entry(ce, ADD_CACHE_OK_TO_ADD |
ADD_CACHE_OK_TO_REPLACE);
one->path);
add_cache_entry(ce, ADD_CACHE_OK_TO_ADD |
ADD_CACHE_OK_TO_REPLACE);
@@
-222,7
+222,7
@@
static void prepend_reflog_action(const char *action, char *buf, size_t size)
if (!rla)
rla = sep = "";
if (snprintf(buf, size, "%s%s%s", rla, sep, action) >= size)
if (!rla)
rla = sep = "";
if (snprintf(buf, size, "%s%s%s", rla, sep, action) >= size)
- warning(
"Reflog action message too long: %.*s..."
, 50, buf);
+ warning(
_("Reflog action message too long: %.*s...")
, 50, buf);
}
static void die_if_unmerged_cache(int reset_type)
}
static void die_if_unmerged_cache(int reset_type)
@@
-300,16
+300,16
@@
int cmd_reset(int argc, const char **argv, const char *prefix)
}
if (get_sha1(rev, sha1))
}
if (get_sha1(rev, sha1))
- die(
"Failed to resolve '%s' as a valid ref."
, rev);
+ die(
_("Failed to resolve '%s' as a valid ref.")
, rev);
commit = lookup_commit_reference(sha1);
if (!commit)
commit = lookup_commit_reference(sha1);
if (!commit)
- die(
"Could not parse object '%s'."
, rev);
+ die(
_("Could not parse object '%s'.")
, rev);
hashcpy(sha1, commit->object.sha1);
if (patch_mode) {
if (reset_type != NONE)
hashcpy(sha1, commit->object.sha1);
if (patch_mode) {
if (reset_type != NONE)
- die(
"--patch is incompatible with --{hard,mixed,soft}"
);
+ die(
_("--patch is incompatible with --{hard,mixed,soft}")
);
return interactive_reset(rev, argv + i, prefix);
}
return interactive_reset(rev, argv + i, prefix);
}
@@
-318,7
+318,7
@@
int cmd_reset(int argc, const char **argv, const char *prefix)
* affecting the working tree nor HEAD. */
if (i < argc) {
if (reset_type == MIXED)
* affecting the working tree nor HEAD. */
if (i < argc) {
if (reset_type == MIXED)
- warning(
"--mixed with paths is deprecated; use 'git reset -- <paths>' instead."
);
+ warning(
_("--mixed with paths is deprecated; use 'git reset -- <paths>' instead.")
);
else if (reset_type != NONE)
die("Cannot do %s reset with paths.",
reset_type_names[reset_type]);
else if (reset_type != NONE)
die("Cannot do %s reset with paths.",
reset_type_names[reset_type]);
@@
-348,7
+348,7
@@
int cmd_reset(int argc, const char **argv, const char *prefix)
if (reset_type == KEEP)
err = err || reset_index_file(sha1, MIXED, quiet);
if (err)
if (reset_type == KEEP)
err = err || reset_index_file(sha1, MIXED, quiet);
if (err)
- die(
"Could not reset index file to revision '%s'."
, rev);
+ die(
_("Could not reset index file to revision '%s'.")
, rev);
}
/* Any resets update HEAD to the head being switched to,
}
/* Any resets update HEAD to the head being switched to,