]> git.ipfire.org Git - thirdparty/git.git/commitdiff
sideband: mark "remote error:" prefix for translation
authorJeff King <peff@peff.net>
Fri, 7 Aug 2020 08:56:49 +0000 (04:56 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Aug 2020 19:01:57 +0000 (12:01 -0700)
A Git client may produce a "remote error:" message (along with whatever
error the other side sent us) in two places:

  - when we see an ERR packet

  - when we're using a sideband and see sideband 3

We can't reliably translate the message the other side sent us, but we
can do so for our own prefix. However, we translate only the ERR-packet
case but not the sideband-3 case. Let's make them consistent (by marking
both for translation).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sideband.c

index ef851113c44ee91e594734bf68567110b7ac8c6b..0a60662fa64b34a9b70c9c362fac02aa8c61083c 100644 (file)
@@ -147,7 +147,7 @@ int demultiplex_sideband(const char *me, char *buf, int len,
        switch (band) {
        case 3:
                if (die_on_error)
-                       die("remote error: %s", buf + 1);
+                       die(_("remote error: %s"), buf + 1);
                strbuf_addf(scratch, "%s%s", scratch->len ? "\n" : "",
                            DISPLAY_PREFIX);
                maybe_colorize_sideband(scratch, buf + 1, len);