From: Alban Gruin <alban.gruin@gmail.com>
To: phillip.wood@dunelm.org.uk, Michal Nowak <mnowak@startmail.com>,
git@vger.kernel.org
Subject: Re: Broken interactive rebase text after some UTF-8 characters
Date: Thu, 31 Jan 2019 18:43:29 +0100 [thread overview]
Message-ID: <505c2e2e-c9bc-aa57-c498-2acced0b8afa@gmail.com> (raw)
In-Reply-To: <8c43e31b-01d8-a1c5-d19c-8efd0e5c1714@talktalk.net>
Hi Phillip and Michal,
I think I found the bug.
If you look at .git/rebase-merge/git-rebase-todo.backup, which is
created before the editor is opened, you can see that it does not have
this problem. In between, transform_todos() is called and causes the
problem reported by Michal.
This seems to be caused by a single line, sequencer:4661 (on b5101f9297,
"Fourth batch after 2.20", 2019-01-29)[1]. If you add just before a
something like this:
fwrite(item->arg, item->arg_len, sizeof(char), stdout);
You will see that the argument is properly written to stdout. But if
you write this:
printf("%.*s\n", item->arg_len, item->arg);
You will have the same broken output as in the todo file.
Are we misusing C formats?
[1] https://github.com/git/git/blob/master/sequencer.c#L4661
Cheers,
Alban
next prev parent reply other threads:[~2019-01-31 17:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 19:29 Broken interactive rebase text after some UTF-8 characters Michal Nowak
2019-01-16 10:33 ` Phillip Wood
2019-01-16 21:36 ` Michal Nowak
2019-01-17 11:04 ` Phillip Wood
2019-01-31 17:43 ` Alban Gruin [this message]
2019-01-31 20:40 ` Phillip Wood
2019-01-31 21:00 ` Alban Gruin
2019-01-31 21:35 ` Junio C Hamano
2019-02-01 7:38 ` Johannes Schindelin
2019-02-01 9:06 ` Michal Nowak
2019-02-01 14:33 ` Johannes Schindelin
2019-02-01 16:24 ` Michal Nowak
2019-02-01 17:30 ` Junio C Hamano
2019-02-01 19:00 ` Michal Nowak
2019-02-01 16:15 ` Alban Gruin
2019-02-01 16:13 ` Alban Gruin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505c2e2e-c9bc-aa57-c498-2acced0b8afa@gmail.com \
--to=alban.gruin@gmail.com \
--cc=git@vger.kernel.org \
--cc=mnowak@startmail.com \
--cc=phillip.wood@dunelm.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).