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

Re: Possible bug: "git log" ignores "--encoding=UTF-8" option if --pretty=format:%e%n%s%n is used

From
Jeff King <peff@peff.net>
Date
Nov 12, 2008, 11:26 UTC
Message-ID
<20081112112654.GA20640@coredump.intra.peff.net>
In-Reply-To
<85647ef50811120311q7bc5451x7c084fd2a7864177@mail.gmail.com>
[re-adding list to the cc]
On Wed, Nov 12, 2008 at 02:11:46PM +0300, Constantine Plotnikov wrote:
Show 10 quoted lines
> > I don't actually use any encodings except UTF-8, so maybe there is some
> > subtle reason not to do so that I don't understand, but I would have
> > expected all of the format placeholders to respect any --encoding
> > parameter.
> >
> Even if this is the bug, it would be better to leave the old behavior
> for backward compatibility reasons and introduce new placeholders.
> Currently tools have to decode messages according to the commit
> encoding, and changing behavior of options will break these tools
> that have implemented workaround for this problem.

Are there such tools? I assumed they would have complained about this as a bug before writing their own encoding conversion tools. And this is, AFAIK, the first bug report.

I don't mind playing it safe to avoid breaking other people's tools, but I'm also not excited about adding a second, "respect encoding" version of many placeholders (and it's not just %s and %b; I think you would need author and committer names and emails, too).

-Peff
Previous: Jeff KingNext: Constantine Plotnikov
Message 3 of 8 in “Possible bug: "git log" ignores "--encoding=UTF-8" option if --pretty=format:%e%n%s%n is used”
  1. Constantine PlotnikovNov 11, 2008
  2. Jeff KingNov 12, 2008
  3. Jeff KingNov 12, 2008
  4. Constantine PlotnikovNov 12, 2008
  5. Junio C HamanoNov 13, 2008
  6. Jeff KingNov 13, 2008
  7. Junio C HamanoNov 13, 2008
  8. Jeff KingNov 13, 2008

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.