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

Re: Possible regression in git-rev-list --header

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 2, 2007, 22:28 UTC
Message-ID
<Pine.LNX.4.63.0701022322030.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vps9xrs9y.fsf@assigned-by-dhcp.cox.net>
Hi,
On Tue, 2 Jan 2007, Junio C Hamano wrote:
Show 33 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> The reason we did the latter, by the way, does not have anything
> >> to do with helping broken parsers.  We drop the header after
> >> re-coding the log message into an encoding specified by the user
> >> (which is presumably different from what the commit was
> >> originally recorded in) because the encoding recorded on
> >> "encoding" header would not match the re-coded log message
> >> anymore.
> >
> > By the same reasoning, you'd have to rewrite the committer line to reflect 
> > the current GIT_COMMITTER_IDENT, or hide it. If you want to convince me, 
> > you have to try harder.
> 
> Sorry, but you completely lost me with that analogy.
> 
> I think showing log message in the user's preferred encoding is
> more like passing the output to the colorization mechanism and
> then to the pager.  We are interacting with humans at that
> point, and we are changing the presentation without changing the
> semantics of the data.  
> 
> I do not see why committer identity needs to be rewritten nor
> hidden by the same reasoning.
> 
> > And Marco has to fix the header parsing anyway.
> 
> No question about that.  If iconv() punts, qgit will see
> "encoding" header to deal with even when the re-coding is in
> effect.  I think it may be a sensible thing for qgit to replace
> the log message and show "log message in this encoding, which
> cannot be shown in this window" instead in such a case, but that
> is up to Porcelain.

Ah! Now I get your reasoning. But it is wrong. You are misusing headers -- which should be metadata describing the commit -- to pass a vital information to a porcelain: "re-encoding failed, please have a try yourself".

But the encoding header describes a certain aspect of the commit object: how it was _originally_ encoded.

It's just like mails: often I look at the X-Mailer: header to find out if the sender by any chance used Windows, or Mac, because it may help me help the sender when incomplete information was provided.

And just like with the mail, I would not like the tool to _hide_ the headers from me when I ask for them, just because it happened to use them already to display the characters correctly.

Ciao, Dscho

Previous: Junio C HamanoNext: Marco Costalba
Message 14 of 26 in “Possible regression in git-rev-list --header”
  1. Marco CostalbaDec 30, 2006
  2. Jakub NarebskiDec 30, 2006
  3. Johannes SchindelinDec 30, 2006
  4. Junio C HamanoDec 30, 2006
  5. Junio C HamanoDec 30, 2006
  6. Johannes SchindelinDec 31, 2006
  7. Junio C HamanoDec 31, 2006
  8. Marco CostalbaDec 31, 2006
  9. Johannes SchindelinDec 31, 2006
  10. Marco CostalbaDec 31, 2006
  11. Junio C HamanoJan 1, 2007
  12. Johannes SchindelinJan 2, 2007
  13. Junio C HamanoJan 2, 2007
  14. Johannes SchindelinJan 2, 2007
  15. Marco CostalbaJan 2, 2007
  16. Marco CostalbaJan 3, 2007
  17. Junio C HamanoJan 3, 2007
  18. Lars HjemliJan 3, 2007
  19. Marco CostalbaJan 3, 2007
  20. Lars HjemliJan 3, 2007
  21. Andreas EricssonJan 4, 2007
  22. Andreas EricssonJan 4, 2007
  23. Lars HjemliJan 3, 2007
  24. Johannes SchindelinDec 31, 2006
  25. Move commit reencoding parameter parsing to revision.cJunio C Hamano, Dec 30, 2006
  26. Johannes SchindelinDec 31, 2006

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.