Re: [PATCH v3 09/20] commit-graph: verify corrupt OID fanout and lookup
From: Duy Nguyen <hidden>
Date: 2018-06-04 14:42:43
On Mon, Jun 4, 2018 at 1:32 PM, Derrick Stolee [off-list ref] wrote:
On 6/2/2018 12:38 AM, Duy Nguyen wrote:quoted
On Thu, May 24, 2018 at 6:25 PM, Derrick Stolee [off-list ref] wrote:quoted
+ if (i && oidcmp(&prev_oid, &cur_oid) >= 0) + graph_report("commit-graph has incorrect OID order: %s then %s", + oid_to_hex(&prev_oid), + oid_to_hex(&cur_oid));Should these strings be marked for translation with _()?I've been asking myself "Is this message helpful to anyone other than a Git developer?" and for this series the only one that is helpful to an end-user is the message about the final hash. If the hash is correct, but these other messages appear, then there is a bug in the code that wrote the file. Otherwise, file corruption is more likely and the correct course of action is to delete and rebuild.
Dev-only strings like this are typically prefixed with "BUG:" or "internal error:" (unless BUG() is a better choice). Git is unfortunately not fully i18n-ized and devs from time to time still forget to mark string for translations when appropriate, including me. Because of this, we still have to slowly scan through the code base and mark more strings for translation. Something to say clearly "not translatable on purpose" would help a lot. If "BUG:" and friends are too much noise, a /* no translate */ comment or some other form could also help. But your explanation to me still sounds like corrupted file in some form, which should be translated unless it's too cryptic. commit-graph format may be available in non-English languages and people can still try to figure out the problem without relying entirely on git developers. -- Duy