path: root/transport.c
diff options
authorNguyễn Thái Ngọc Duy <>2018-07-21 07:49:19 (GMT)
committerJunio C Hamano <>2018-07-23 18:19:09 (GMT)
commit1a07e59c3e269418f3f5d186d166bf5ab5db6667 (patch)
treeaf7144a561d023b0d095c6c5463d00fe05248be6 /transport.c
parente3331758f12da22f4103eec7efe1b5304a9be5e9 (diff)
Update messages in preparation for i18n
Many messages will be marked for translation in the following commits. This commit updates some of them to be more consistent and reduce diff noise in those commits. Changes are - keep the first letter of die(), error() and warning() in lowercase - no full stop in die(), error() or warning() if it's single sentence messages - indentation - some messages are turned to BUG(), or prefixed with "BUG:" and will not be marked for i18n - some messages are improved to give more information - some messages are broken down by sentence to be i18n friendly (on the same token, combine multiple warning() into one big string) - the trailing \n is converted to printf_ln if possible, or deleted if not redundant - errno_errno() is used instead of explicit strerror() Signed-off-by: Nguyễn Thái Ngọc Duy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'transport.c')
1 files changed, 4 insertions, 4 deletions
diff --git a/transport.c b/transport.c
index a32da30..9fcc339 100644
--- a/transport.c
+++ b/transport.c
@@ -139,7 +139,7 @@ static struct ref *get_refs_from_bundle(struct transport *transport,
data->fd = read_bundle_header(transport->url, &data->header);
if (data->fd < 0)
- die ("Could not read bundle '%s'.", transport->url);
+ die("could not read bundle '%s'", transport->url);
for (i = 0; i < data->; i++) {
struct ref_list_entry *e = data->header.references.list + i;
struct ref *ref = alloc_ref(e->name);
@@ -875,7 +875,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
ret->progress = isatty(2);
if (!remote)
- die("No remote provided to transport_get()");
+ BUG("No remote provided to transport_get()");
ret->got_remote_refs = 0;
ret->remote = remote;
@@ -1143,7 +1143,7 @@ int transport_push(struct transport *transport,
pretend)) {
- die("Failed to push all needed submodules!");
+ die("failed to push all needed submodules!");
@@ -1265,7 +1265,7 @@ int transport_connect(struct transport *transport, const char *name,
if (transport->vtable->connect)
return transport->vtable->connect(transport, name, exec, fd);
- die("Operation not supported by protocol");
+ die("operation not supported by protocol");
int transport_disconnect(struct transport *transport)