Re: [PATCH v2 06/23] builtin/pack-objects.c: mark more strings for translation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 19, 2018, 18:40 UTC
- Message-ID
- <xmqq601bf4rm.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180718161101.19765-7-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 6 quoted lines
> @@ -149,7 +149,7 @@ static void *get_delta(struct object_entry *entry)
> delta_buf = diff_delta(base_buf, base_size,
> buf, size, &delta_size, 0);
> if (!delta_buf || delta_size != DELTA_SIZE(entry))
> - die("delta size changed");
> + die(_("delta size changed"));I wonder if this should be a BUG("..."), as it falls into the same category as assert(), just like others turned into BUG("...") with step 01/23. If the following observation is correct, then we need to turn this message into BUG() in 01/23 in a reroll and leave it untranslated:
In try_delta() we have earlier tried delta against many other
objects and picked the best one as (base object, size of delta,
delta chain length) tuple, and in the caller of this function,
we write out the delta by recomputing it (because the resulting
delta, unless it is trivially small, would have been discarded
long before we come to this phase). If diff_delta() between
that chosen base object results in a different size from what we
observed earlier, on which we based our decision to use this
object as the base in the first place, we have a problem.