git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/4] sequencer: do not translate reflog messages

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 19, 2022, 15:12 UTC
Message-ID
<220819.86o7wg6zci.gmgdl@evledraar.gmail.com>
In-Reply-To
<6oqr69o7-qsps-sr86-o4r9-16r7no9n5424@tzk.qr>
On Fri, Aug 19 2022, Johannes Schindelin wrote:
Show 46 quoted lines
> Hi Ævar,
>
> On Thu, 18 Aug 2022, Ævar Arnfjörð Bjarmason wrote:
>
>> On Thu, Aug 18 2022, Michael J Gruber wrote:
>>
>> > Traditionally, reflog messages were never translated, in particular not
>> > on storage.
>> >
>> > Due to the switch of more parts of git to the sequencer, old changes in
>> > the sequencer code may lead to recent changes in git's behaviour. E.g.:
>> > c28cbc5ea6 ("sequencer: mark action_name() for translation", 2016-10-21)
>> > marked several uses of `action_name()` for translation. Recently, this
>> > lead to a partially translated reflog:
>> >
>> > `rebase: fast-forward` is translated (e.g. in de to `Rebase: Vorspulen`)
>> > whereas other reflog entries such as `rebase (pick):` remain
>> > untranslated as they should be.
>> >
>> > Change the relevant line in the sequencer so that this reflog entry
>> > remains untranslated, as well.
>> >
>> > Signed-off-by: Michael J Gruber <git@grubix.eu>
>> > ---
>> >  sequencer.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/sequencer.c b/sequencer.c
>> > index 5f22b7cd37..51d75dfbe1 100644
>> > --- a/sequencer.c
>> > +++ b/sequencer.c
>> > @@ -575,7 +575,7 @@ static int fast_forward_to(struct repository *r,
>> >  	if (checkout_fast_forward(r, from, to, 1))
>> >  		return -1; /* the callee should have complained already */
>> >
>> > -	strbuf_addf(&sb, _("%s: fast-forward"), _(action_name(opts)));
>> > +	strbuf_addf(&sb, "%s: fast-forward", action_name(opts));
>> >
>> >  	transaction = ref_transaction_begin(&err);
>> >  	if (!transaction ||
>>
>> I 95% agree with this direction, but the other 5% of me is thinking
>> "isn't this fine then? Let's keep it?".
>
> No, it's not fine, we mustn't keep it, because we expect Git itself to
> parse the reflog.

Doesn't that also mean that the relevant functionality is now also (and still?) broken on any repository where these translations ended up on-disk?

Previous: Johannes SchindelinNext: Junio C Hamano
Message 13 of 34 in “sequencer: do not translate reflog messages”
  1. sequencer: do not translate reflog messagesMichael J Gruber, Aug 12, 2022
  2. Junio C HamanoAug 12, 2022
  3. Phillip WoodAug 12, 2022
  4. Junio C HamanoAug 12, 2022
  5. Johannes SchindelinAug 15, 2022
  6. Phillip WoodAug 16, 2022
  7. Johannes SchindelinAug 16, 2022
  8. 0/4 sequencer: clarify translationsMichael J Gruber, Aug 18, 2022
  9. 3/4 sequencer: do not translate command namesMichael J Gruber, Aug 18, 2022
  10. 1/4 sequencer: do not translate reflog messagesMichael J Gruber, Aug 18, 2022
  11. Ævar Arnfjörð BjarmasonAug 18, 2022
  12. Johannes SchindelinAug 19, 2022
  13. Ævar Arnfjörð BjarmasonAug 19, 2022
  14. Junio C HamanoAug 19, 2022
  15. Ævar Arnfjörð BjarmasonAug 19, 2022
  16. Junio C HamanoAug 19, 2022
  17. Ævar Arnfjörð BjarmasonAug 19, 2022
  18. Jeff KingAug 20, 2022
  19. Junio C HamanoAug 20, 2022
  20. 2/4 sequencer: do not translate parameters to error_resolve_conflict()Michael J Gruber, Aug 18, 2022
  21. Ævar Arnfjörð BjarmasonAug 18, 2022
  22. Michael J GruberAug 18, 2022
  23. Junio C HamanoAug 18, 2022
  24. Johannes SchindelinAug 19, 2022
  25. Junio C HamanoAug 19, 2022
  26. Johannes SchindelinAug 22, 2022
  27. Junio C HamanoAug 22, 2022
  28. 4/4 po: adjust README to codeMichael J Gruber, Aug 18, 2022
  29. Ævar Arnfjörð BjarmasonAug 18, 2022
  30. Junio C HamanoAug 18, 2022
  31. 4/4 sequencer: spell out command names and do not translate themMichael J Gruber, Aug 19, 2022
  32. Johannes SchindelinAug 19, 2022
  33. Johannes SchindelinAug 19, 2022
  34. Michael J GruberAug 19, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.