Stefan Beller <stefanbel...@gmail.com> writes:

> blame belonging to the group of
> ancillaryinterrogators and not to plumbinginterrogators
> should have localized error messages?

Unless running under --porcelain option to be driven by scripts, we
expect that we are talking to a human user, so using "_(msg)" is very
much appropriate for that case.

A possibly problematic script might do something like this:

        git blame --porcelain "$1" 2>&1 |
        awk "$awkScript"

and the $awkScript may check the input lines that do not match the
expected pattern the output lines from the command follow and act on
them, though.  _(msg) is unwelcome to such a script [*1*].

I suspect the above problem is likely to be theoretical.  People
would be more sloppy and write this instead:

        git blame --porcelain "$1" |
        awk "$awkScript"

and let the problem pass unnoticed, affecting the later parts of
their processing ;-).  And "_(msg)", not "msg", would help.


[Footnote]

*1* ... and with possible interleaving of output that came to the
standard output and the standard error, such parsing by $awkScript
would not be a reliable way to do this anyway.  A truly careful one
has to be written along the lines of:

        git blame --porcelain "$1" >"$tmp" &&
        awk "$awkScript" <"$tmp"

anyway.

> Signed-off-by: Stefan Beller <stefanbel...@gmail.com>
> ---
>  builtin/blame.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/blame.c b/builtin/blame.c
> index 17d30d0..ca4ba6f 100644
> --- a/builtin/blame.c
> +++ b/builtin/blame.c
> @@ -2700,7 +2700,7 @@ parse_done:
>        * uninteresting.
>        */
>       if (prepare_revision_walk(&revs))
> -             die("revision walk setup failed");
> +             die(_("revision walk setup failed"));
>  
>       if (is_null_sha1(sb.final->object.sha1)) {
>               o = sb.final->util;
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to