Re: [PATCH 2/3] sha1_name: get_sha1_with_context learns to follow symlinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Junio C Hamano" <gitster@xxxxxxxxx>
On Fri, May 8, 2015 at 12:45 PM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
+ if (flags & GET_SHA1_FOLLOW_SYMLINKS && flags & GET_SHA1_ONLY_TO_DIE) + die(_("internal error: bad flags for get_sha1_with_context"));

There may not be much value in marking an "internal error" string for
translation.

The whole point of this kind of messages is so that the end users,
when they see it trigger, can notify us and then to allow us to
identify which die() triggered.  It is not just "may not be much
value in", but is actively unproductive to make it translatable,
even if we ignore the cost to i18n/l10n teams to translate such
messages.

By the way, we would want to standardise the string before the
colon, so that we can tell users "If you see an error message that
begins with 'internal error:', please report that to us---it is a
programming error".  I think the majority of existing code uses the
string "BUG:" for that, and I do not mind using 'internal error:'
for that purpose instead, but the important thing is to use just one
single string thoughout the codebase, so that the "please report
when you see this" message we give the users can be simple.

I would see "BUG:" as being internationally recognised, while "internal error:" would need to be translated, and perhaps be written "internal error, report this to git@xxxxxxxxxxxxxxx:" to ensure that the reader knows immediately what to do.
--
Philip
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]