From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rolf Bjarne Kvinge" Subject: Re: Unapplied patches reminder Date: Mon, 19 Oct 2009 13:57:29 +0200 Organization: Novell Message-ID: References: <20091019052030.6117@nanako3.lavabit.com> <7vzl7ogtxs.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=----------Deh0UO6WqGgSIwaZJn3BxV Cc: "Nanako Shiraishi" , git@vger.kernel.org To: "Junio C Hamano" X-From: git-owner@vger.kernel.org Mon Oct 19 13:56:19 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mzqpn-000347-7i for gcvg-git-2@lo.gmane.org; Mon, 19 Oct 2009 13:55:31 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752125AbZJSLzU (ORCPT ); Mon, 19 Oct 2009 07:55:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751316AbZJSLzU (ORCPT ); Mon, 19 Oct 2009 07:55:20 -0400 Received: from vpn.id2.novell.com ([195.33.99.129]:58164 "EHLO gwia-smtp.id2.novell.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750846AbZJSLzT (ORCPT ); Mon, 19 Oct 2009 07:55:19 -0400 Received: from linux.home ([::ffff:149.44.117.250]) by gwia-smtp.id2.novell.com with ESMTP; Mon, 19 Oct 2009 13:42:51 +0100 In-Reply-To: <7vzl7ogtxs.fsf@alter.siamese.dyndns.org> User-Agent: Opera Mail/10.00 (Linux) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: ------------Deh0UO6WqGgSIwaZJn3BxV Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: 8bit On Mon, 19 Oct 2009 01:31:59 +0200, Junio C Hamano wrote: > Nanako Shiraishi 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" >> Subject: git rev-list --pretty=raw strips empty lines >> Date: Tue, 06 Oct 2009 14:33:37 +0200 >> Message-ID: >> >> 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/ ------------Deh0UO6WqGgSIwaZJn3BxV Content-Disposition: attachment; filename*0="0001-pretty.c-Don-t-do-any-transformatio"; filename*1="ns-when-using-the.patch" Content-Type: application/octet-stream; name*0="0001-pretty.c-Don-t-do-any-transformatio"; name*1="ns-when-using-the.patch" Content-Transfer-Encoding: Base64 ------------Deh0UO6WqGgSIwaZJn3BxV Content-Disposition: attachment; filename=0001-pretty.c-special-case-raw-format.patch Content-Type: application/octet-stream; name=0001-pretty.c-special-case-raw-format.patch Content-Transfer-Encoding: Base64 RnJvbSA0ZmE5ZTRjMWMxMzNmYmUzNDIzYzk3OWVmZDU3MjJkZDdiZDVkNTMwIE1v biBTZXAgMTcgMDA6MDA6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