@ -398,7 +398,7 @@ static int fetch_with_fetch(struct transport *transport,
@@ -398,7 +398,7 @@ static int fetch_with_fetch(struct transport *transport,
if (starts_with(buf.buf, "lock ")) {
const char *name = buf.buf + 5;
if (transport->pack_lockfile)
warning("%s also locked %s", data->name, name);
warning(_("%s also locked %s"), data->name, name);
else
transport->pack_lockfile = xstrdup(name);
}
@ -409,7 +409,7 @@ static int fetch_with_fetch(struct transport *transport,
@@ -409,7 +409,7 @@ static int fetch_with_fetch(struct transport *transport,
@ -476,7 +476,7 @@ static int fetch_with_import(struct transport *transport,
@@ -476,7 +476,7 @@ static int fetch_with_import(struct transport *transport,
get_helper(transport);
if (get_importer(transport, &fastimport))
die("couldn't run fast-import");
die(_("couldn't run fast-import"));
for (i = 0; i < nr_heads; i++) {
posn = to_fetch[i];
@ -499,7 +499,7 @@ static int fetch_with_import(struct transport *transport,
@@ -499,7 +499,7 @@ static int fetch_with_import(struct transport *transport,
*/
if (finish_command(&fastimport))
die("error while running fast-import");
die(_("error while running fast-import"));
/*
* The fast-import stream of a remote helper that advertises
@ -528,7 +528,7 @@ static int fetch_with_import(struct transport *transport,
@@ -528,7 +528,7 @@ static int fetch_with_import(struct transport *transport,
private = xstrdup(name);
if (private) {
if (read_ref(private, &posn->old_oid) < 0)
die("could not read ref %s", private);
die(_("could not read ref %s"), private);
free(private);
}
}
@ -554,7 +554,7 @@ static int run_connect(struct transport *transport, struct strbuf *cmdbuf)
@@ -554,7 +554,7 @@ static int run_connect(struct transport *transport, struct strbuf *cmdbuf)
*/
duped = dup(helper->out);
if (duped < 0)
die_errno("can't dup helper output fd");
die_errno(_("can't dup helper output fd"));
input = xfdopen(duped, "r");
setvbuf(input, NULL, _IONBF, 0);
@ -573,8 +573,8 @@ static int run_connect(struct transport *transport, struct strbuf *cmdbuf)
@@ -573,8 +573,8 @@ static int run_connect(struct transport *transport, struct strbuf *cmdbuf)
fprintf(stderr, "Debug: Falling back to dumb "
"transport.\n");
} else {
die("unknown response to connect: %s",
cmdbuf->buf);
die(_(_("unknown response to connect: %s")),
cmdbuf->buf);
}
fclose(input);
@ -595,9 +595,9 @@ static int process_connect_service(struct transport *transport,
@@ -595,9 +595,9 @@ static int process_connect_service(struct transport *transport,
if (strcmp(name, exec)) {
int r = set_helper_option(transport, "servpath", exec);
if (r > 0)
warning("setting remote service path not supported by protocol");
warning(_("setting remote service path not supported by protocol"));
else if (r < 0)
warning("invalid remote service path");
warning(_("invalid remote service path"));
}
if (data->connect) {
@ -640,10 +640,10 @@ static int connect_helper(struct transport *transport, const char *name,
@@ -640,10 +640,10 @@ static int connect_helper(struct transport *transport, const char *name,
/* Get_helper so connect is inited. */
get_helper(transport);
if (!data->connect)
die("operation not supported by protocol");
die(_("operation not supported by protocol"));
if (!process_connect_service(transport, name, exec))
die("can't connect to subservice %s", name);
die(_("can't connect to subservice %s"), name);
fd[0] = data->helper->out;
fd[1] = data->helper->in;
@ -707,7 +707,7 @@ static int push_update_ref_status(struct strbuf *buf,
@@ -707,7 +707,7 @@ static int push_update_ref_status(struct strbuf *buf,
status = REF_STATUS_REMOTE_REJECT;
refname = buf->buf + 6;
} else
die("expected ok/error, helper said '%s'", buf->buf);
die(_("expected ok/error, helper said '%s'"), buf->buf);
msg = strchr(refname, ' ');
if (msg) {
@ -760,7 +760,7 @@ static int push_update_ref_status(struct strbuf *buf,
@@ -760,7 +760,7 @@ static int push_update_ref_status(struct strbuf *buf,
if (!*ref)
*ref = find_ref_by_name(remote_refs, refname);
if (!*ref) {
warning("helper reported unexpected status of %s", refname);
warning(_("helper reported unexpected status of %s"), refname);
return 1;
}
@ -821,20 +821,20 @@ static void set_common_push_options(struct transport *transport,
@@ -821,20 +821,20 @@ static void set_common_push_options(struct transport *transport,
{
if (flags & TRANSPORT_PUSH_DRY_RUN) {
if (set_helper_option(transport, "dry-run", "true") != 0)
die("helper %s does not support dry-run", name);
die(_("helper %s does not support dry-run"), name);
} else if (flags & TRANSPORT_PUSH_CERT_ALWAYS) {
if (set_helper_option(transport, TRANS_OPT_PUSH_CERT, "true") != 0)
die("helper %s does not support --signed", name);
die(_("helper %s does not support --signed"), name);
} else if (flags & TRANSPORT_PUSH_CERT_IF_ASKED) {
if (set_helper_option(transport, TRANS_OPT_PUSH_CERT, "if-asked") != 0)
die("helper %s does not support --signed=if-asked", name);
die(_("helper %s does not support --signed=if-asked"), name);
if (set_helper_option(transport, "push-option", item->string) != 0)
die("helper %s does not support 'push-option'", name);
die(_("helper %s does not support 'push-option'"), name);
}
}
@ -926,12 +926,12 @@ static int push_refs_with_export(struct transport *transport,
@@ -926,12 +926,12 @@ static int push_refs_with_export(struct transport *transport,
struct strbuf buf = STRBUF_INIT;
if (!data->rs.nr)
die("remote-helper doesn't support push; refspec needed");
die(_("remote-helper doesn't support push; refspec needed"));
if (set_helper_option(transport, "force", "true") != 0)
warning("helper %s does not support 'force'", data->name);
warning(_("helper %s does not support 'force'"), data->name);
}
helper = get_helper(transport);
@ -978,12 +978,12 @@ static int push_refs_with_export(struct transport *transport,
@@ -978,12 +978,12 @@ static int push_refs_with_export(struct transport *transport,
}
if (get_exporter(transport, &exporter, &revlist_args))
die("couldn't run fast-export");
die(_("couldn't run fast-export"));
string_list_clear(&revlist_args, 1);
if (finish_command(&exporter))
die("error while running fast-export");
die(_("error while running fast-export"));
if (push_update_refs_status(data, remote_refs, flags))
return 1;
@ -1007,8 +1007,9 @@ static int push_refs(struct transport *transport,
@@ -1007,8 +1007,9 @@ static int push_refs(struct transport *transport,
}
if (!remote_refs) {
fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
"Perhaps you should specify a branch such as 'master'.\n");
fprintf(stderr,
_("No refs in common and none specified; doing nothing.\n"
"Perhaps you should specify a branch such as 'master'.\n"));
return 0;
}
@ -1070,7 +1071,7 @@ static struct ref *get_refs_list(struct transport *transport, int for_push,
@@ -1070,7 +1071,7 @@ static struct ref *get_refs_list(struct transport *transport, int for_push,
eov = strchr(buf.buf, ' ');
if (!eov)
die("malformed response in ref list: %s", buf.buf);
die(_("malformed response in ref list: %s"), buf.buf);
eon = strchr(eov + 1, ' ');
*eov = '\0';
if (eon)
@ -1223,7 +1224,7 @@ static int udt_do_read(struct unidirectional_transfer *t)
@@ -1223,7 +1224,7 @@ static int udt_do_read(struct unidirectional_transfer *t)