Re: Unapplied patches reminder

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

 



On Mon, 19 Oct 2009 01:31:59 +0200, Junio C Hamano <gitster@xxxxxxxxx> wrote:

Nanako Shiraishi <nanako3@xxxxxxxxxxx> writes:

Junio, I saw these patches and thought what they try to do were
sensible, but I don't them in your tree. I didn't see much discussion
on most of them, either.

Because I don't read C very well, I may have listed some patches
here that you may have discarded because the code was no good, and
if so I apologize for wasting your time, but I thought at least
some of them should be salvaged.
...
From: "Rolf Bjarne Kvinge" <RKvinge@xxxxxxxxxx>
Subject: git rev-list --pretty=raw strips empty lines
Date: Tue, 06 Oct 2009 14:33:37 +0200
Message-ID: <op.u1do6bq5k71drc@xxxxxxxxxxxx>

    It seems like the --pretty=raw format strips off empty newlines from
    the beginning of log messages, while I'd expect the raw format to
    not do any transformations (just as the documentation says: "The
    'raw' format shows the entire commit exactly as stored in the commit
    object").

    The below changes works for me, not sure if I'm right about this
    though (my first time here ;-)

I do not recall seeing this one; most likely it was lost in the noise,
especially because it did not look like a patch submission, without having
anything resembling a commit log message.

I think the change itself is an uncontroversial one, even though this
really changes the behaviour.

My specific need is to be able to get out the exact same log message as I committed, another way of getting the same result would be to implement --pretty=xml (along the lines of subversions 'svn log --xml'). This would prevent behavioural changes. And yes, I'm willing to implement it if you agree it's a good idea.

Regarding the previous patch I just found that it's not complete - git would still print lines with only whitespace as empty lines (i.e. stripping off the whitespace). I'm attaching a revised patch that fixes this issue, but since I found the resulting code slightly ugly, I also found an easier approach: in pretty_print_commit (pretty.c) just print the commit message buffer and return.

Rolf

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Attachment: bin6wE4TUxn7k.bin
Description: Binary data

Attachment: 0001-pretty.c-special-case-raw-format.patch
Description: Binary data


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