git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Gilger <heipei@hackvalue.de>
To: Git Mailing List <git@vger.kernel.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	Johannes Gilger <heipei@hackvalue.de>
Subject: Re: [PATCH 3/3] Add "%w" to pretty formats, which rewraps the commit message
Date: Wed, 23 Sep 2009 23:00:56 +0200	[thread overview]
Message-ID: <20090923210055.GA25197@dualtron.vpn.rwth-aachen.de> (raw)
In-Reply-To: <alpine.DEB.1.00.0909232233590.4985@pacific.mpi-cbg.de>

On 23/09/09 22:34, Johannes Schindelin wrote:
> With "--pretty=format:%w(8,6,70)" you will get the commit messages
> reformatted to width 70 where the first line has indent 8 and the
> subsequent lines have indent 6.

Hey Johannes,

you sent me your patches earlier (and I really liked the idea and could 
use it too, especially with svn-mindset people). One thing that bothers 
me about the %w flag is that is includes subject and body, when we 
already have atoms for both of these flags. So having a subject(x,y) and 
body(x,y) tag (where x is indent and y is textwidth to be rewrapped) 
would be nicer and more in the spirit of the existing format options 
imho.

Having said that I also have to acknowledge a clear advantage of your 
patch, which is that one doesn't need to clear trailing newlines when 
the subject is < wrapwidth and the body is empty (and one used 
%s(x,y)%n%n%b(x,y) as a format-tag). With my %B, %B(n) patch which is on 
pu (and which you should probably consider in case it gets into next ;) 
I do this by calling strbuf_rtrim after adding the body.

Greetings,
Jojo

-- 
Johannes Gilger <heipei@hackvalue.de>
http://heipei.net
GPG-Key: 0x42F6DE81
GPG-Fingerprint: BB49 F967 775E BB52 3A81  882C 58EE B178 42F6 DE81

  reply	other threads:[~2009-09-23 21:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 22:47 [PATCH] git-log --format: Add %B tag with %B(x) option Johannes Gilger
2009-09-17 23:27 ` Junio C Hamano
2009-09-18 18:00   ` [PATCHv2] " Johannes Gilger
2009-09-18 19:12     ` Junio C Hamano
2009-09-19  9:58       ` [PATCHv3] " Johannes Gilger
2009-09-22 19:41         ` Junio C Hamano
2009-09-22 21:30           ` [PATCHv4] git-log --format: Add %B tag with %B(n) option Johannes Gilger
2009-09-23 20:34             ` [PATCH 0/3] Add a pretty format to rewrapping/indenting commit messages Johannes Schindelin
2009-09-23 20:34               ` [PATCH 1/3] print_wrapped_text(): allow hard newlines Johannes Schindelin
2009-09-23 20:34                 ` [PATCH 2/3] Add strbuf_add_wrapped_text() to utf8.[ch] Johannes Schindelin
2009-09-23 20:34                   ` [PATCH 3/3] Add "%w" to pretty formats, which rewraps the commit message Johannes Schindelin
2009-09-23 21:00                     ` Johannes Gilger [this message]
2009-09-23 23:19                       ` Junio C Hamano
2009-10-05  6:25                         ` Junio C Hamano
2009-09-24  0:00                 ` [PATCH 1/3] print_wrapped_text(): allow hard newlines Linus Torvalds
2009-09-24  0:19                   ` Johannes Schindelin
2009-09-25  8:21                   ` Johannes Schindelin
2009-10-10  0:57             ` [PATCHv4] git-log --format: Add %B tag with %B(n) option Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090923210055.GA25197@dualtron.vpn.rwth-aachen.de \
    --to=heipei@hackvalue.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).