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

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

 



On Fri, Aug 19 2022, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:
>
>> 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?
>
> It may, but the first response to that problem is not to make the
> breakage in repositires worse by keep adding unparseable data to
> them.

*nod*, but where is that breakage specifically? I don't see where we're
parsing this message out again. I tried to test it out with the below
(making the message as un-helpful as possible). All our tests pass, but
of course our coverage may just be lacking...

diff --git a/sequencer.c b/sequencer.c
index 5f22b7cd377..9e039e26b5a 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -391,19 +391,24 @@ int sequencer_remove_state(struct replay_opts *opts)
 	return ret;
 }
 
-static const char *action_name(const struct replay_opts *opts)
+static const char *action_name_1(const struct replay_opts *opts, int revert)
 {
 	switch (opts->action) {
 	case REPLAY_REVERT:
-		return N_("revert");
+		return revert ? N_("trever") : N_("revert");
 	case REPLAY_PICK:
-		return N_("cherry-pick");
+		return revert ? N_("kcip-yrrehc") : N_("cherry-pick");
 	case REPLAY_INTERACTIVE_REBASE:
-		return N_("rebase");
+		return revert ? N_("esaber") : N_("rebase");
 	}
 	die(_("unknown action: %d"), opts->action);
 }
 
+static const char *action_name(const struct replay_opts *opts)
+{
+	return action_name_1(opts, 0);
+}
+
 struct commit_message {
 	char *parent_label;
 	char *label;
@@ -575,7 +580,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, _("drawrof-tsaf: %s"), _(action_name_1(opts, 1)));
 
 	transaction = ref_transaction_begin(&err);
 	if (!transaction ||




[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]

  Powered by Linux