i18n: git-fetch basic messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Ævar Arnfjörð Bjarmason 2011-02-22 23:41:51 +00:00 committed by Junio C Hamano
parent 54214529b5
commit bd4a51fc25
1 changed files with 23 additions and 23 deletions

View File

@ -184,7 +184,7 @@ static struct ref *get_ref_map(struct transport *transport,
} else { } else {
ref_map = get_remote_ref(remote_refs, "HEAD"); ref_map = get_remote_ref(remote_refs, "HEAD");
if (!ref_map) if (!ref_map)
die("Couldn't find remote ref HEAD"); die(_("Couldn't find remote ref HEAD"));
ref_map->merge = 1; ref_map->merge = 1;
tail = &ref_map->next; tail = &ref_map->next;
} }
@ -237,7 +237,7 @@ static int update_local_ref(struct ref *ref,
*display = 0; *display = 0;
type = sha1_object_info(ref->new_sha1, NULL); type = sha1_object_info(ref->new_sha1, NULL);
if (type < 0) if (type < 0)
die("object %s not found", sha1_to_hex(ref->new_sha1)); die(_("object %s not found"), sha1_to_hex(ref->new_sha1));


if (!hashcmp(ref->old_sha1, ref->new_sha1)) { if (!hashcmp(ref->old_sha1, ref->new_sha1)) {
if (verbosity > 0) if (verbosity > 0)
@ -337,7 +337,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,


fp = fopen(filename, "a"); fp = fopen(filename, "a");
if (!fp) if (!fp)
return error("cannot open %s: %s\n", filename, strerror(errno)); return error(_("cannot open %s: %s\n"), filename, strerror(errno));


if (raw_url) if (raw_url)
url = transport_anonymize_url(raw_url); url = transport_anonymize_url(raw_url);
@ -426,9 +426,9 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
free(url); free(url);
fclose(fp); fclose(fp);
if (rc & STORE_REF_ERROR_DF_CONFLICT) if (rc & STORE_REF_ERROR_DF_CONFLICT)
error("some local refs could not be updated; try running\n" error(_("some local refs could not be updated; try running\n"
" 'git remote prune %s' to remove any old, conflicting " " 'git remote prune %s' to remove any old, conflicting "
"branches", remote_name); "branches"), remote_name);
return rc; return rc;
} }


@ -476,7 +476,7 @@ static int quickfetch(struct ref *ref_map)


err = start_command(&revlist); err = start_command(&revlist);
if (err) { if (err) {
error("could not run rev-list"); error(_("could not run rev-list"));
return err; return err;
} }


@ -490,14 +490,14 @@ static int quickfetch(struct ref *ref_map)
if (write_in_full(revlist.in, sha1_to_hex(ref->old_sha1), 40) < 0 || if (write_in_full(revlist.in, sha1_to_hex(ref->old_sha1), 40) < 0 ||
write_str_in_full(revlist.in, "\n") < 0) { write_str_in_full(revlist.in, "\n") < 0) {
if (errno != EPIPE && errno != EINVAL) if (errno != EPIPE && errno != EINVAL)
error("failed write to rev-list: %s", strerror(errno)); error(_("failed write to rev-list: %s"), strerror(errno));
err = -1; err = -1;
break; break;
} }
} }


if (close(revlist.in)) { if (close(revlist.in)) {
error("failed to close rev-list's stdin: %s", strerror(errno)); error(_("failed to close rev-list's stdin: %s"), strerror(errno));
err = -1; err = -1;
} }


@ -650,8 +650,8 @@ static void check_not_current_branch(struct ref *ref_map)
for (; ref_map; ref_map = ref_map->next) for (; ref_map; ref_map = ref_map->next)
if (ref_map->peer_ref && !strcmp(current_branch->refname, if (ref_map->peer_ref && !strcmp(current_branch->refname,
ref_map->peer_ref->name)) ref_map->peer_ref->name))
die("Refusing to fetch into current branch %s " die(_("Refusing to fetch into current branch %s "
"of non-bare repository", current_branch->refname); "of non-bare repository"), current_branch->refname);
} }


static int truncate_fetch_head(void) static int truncate_fetch_head(void)
@ -660,7 +660,7 @@ static int truncate_fetch_head(void)
FILE *fp = fopen(filename, "w"); FILE *fp = fopen(filename, "w");


if (!fp) if (!fp)
return error("cannot open %s: %s\n", filename, strerror(errno)); return error(_("cannot open %s: %s\n"), filename, strerror(errno));
fclose(fp); fclose(fp);
return 0; return 0;
} }
@ -684,7 +684,7 @@ static int do_fetch(struct transport *transport,
} }


if (!transport->get_refs_list || !transport->fetch) if (!transport->get_refs_list || !transport->fetch)
die("Don't know how to fetch from %s", transport->url); die(_("Don't know how to fetch from %s"), transport->url);


/* if not appending, truncate FETCH_HEAD */ /* if not appending, truncate FETCH_HEAD */
if (!append && !dry_run) { if (!append && !dry_run) {
@ -738,10 +738,10 @@ static void set_option(const char *name, const char *value)
{ {
int r = transport_set_option(transport, name, value); int r = transport_set_option(transport, name, value);
if (r < 0) if (r < 0)
die("Option \"%s\" value \"%s\" is not valid for %s", die(_("Option \"%s\" value \"%s\" is not valid for %s"),
name, value, transport->url); name, value, transport->url);
if (r > 0) if (r > 0)
warning("Option \"%s\" is ignored for %s\n", warning(_("Option \"%s\" is ignored for %s\n"),
name, transport->url); name, transport->url);
} }


@ -838,9 +838,9 @@ static int fetch_multiple(struct string_list *list)
argv[argc] = name; argv[argc] = name;
argv[argc + 1] = NULL; argv[argc + 1] = NULL;
if (verbosity >= 0) if (verbosity >= 0)
printf("Fetching %s\n", name); printf(_("Fetching %s\n"), name);
if (run_command_v_opt(argv, RUN_GIT_CMD)) { if (run_command_v_opt(argv, RUN_GIT_CMD)) {
error("Could not fetch %s", name); error(_("Could not fetch %s"), name);
result = 1; result = 1;
} }
} }
@ -856,8 +856,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
int exit_code; int exit_code;


if (!remote) if (!remote)
die("No remote repository specified. Please, specify either a URL or a\n" die(_("No remote repository specified. Please, specify either a URL or a\n"
"remote name from which new revisions should be fetched."); "remote name from which new revisions should be fetched."));


transport = transport_get(remote, NULL); transport = transport_get(remote, NULL);
transport_set_verbosity(transport, verbosity, progress); transport_set_verbosity(transport, verbosity, progress);
@ -876,7 +876,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
char *ref; char *ref;
i++; i++;
if (i >= argc) if (i >= argc)
die("You need to specify a tag name."); die(_("You need to specify a tag name."));
ref = xmalloc(strlen(argv[i]) * 2 + 22); ref = xmalloc(strlen(argv[i]) * 2 + 22);
strcpy(ref, "refs/tags/"); strcpy(ref, "refs/tags/");
strcat(ref, argv[i]); strcat(ref, argv[i]);
@ -916,9 +916,9 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)


if (all) { if (all) {
if (argc == 1) if (argc == 1)
die("fetch --all does not take a repository argument"); die(_("fetch --all does not take a repository argument"));
else if (argc > 1) else if (argc > 1)
die("fetch --all does not make sense with refspecs"); die(_("fetch --all does not make sense with refspecs"));
(void) for_each_remote(get_one_remote_for_fetch, &list); (void) for_each_remote(get_one_remote_for_fetch, &list);
result = fetch_multiple(&list); result = fetch_multiple(&list);
} else if (argc == 0) { } else if (argc == 0) {
@ -929,7 +929,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
/* All arguments are assumed to be remotes or groups */ /* All arguments are assumed to be remotes or groups */
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
if (!add_remote_or_group(argv[i], &list)) if (!add_remote_or_group(argv[i], &list))
die("No such remote or remote group: %s", argv[i]); die(_("No such remote or remote group: %s"), argv[i]);
result = fetch_multiple(&list); result = fetch_multiple(&list);
} else { } else {
/* Single remote or group */ /* Single remote or group */
@ -937,7 +937,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
if (list.nr > 1) { if (list.nr > 1) {
/* More than one remote */ /* More than one remote */
if (argc > 1) if (argc > 1)
die("Fetching a group and specifying refspecs does not make sense"); die(_("Fetching a group and specifying refspecs does not make sense"));
result = fetch_multiple(&list); result = fetch_multiple(&list);
} else { } else {
/* Zero or one remotes */ /* Zero or one remotes */