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

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

 



Hi,

On Tue, 2 Jan 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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