Git development
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] format-patch: fix skipping of blank-lines
Date: Fri, 8 Jul 2005 18:42:26 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0507081838560.17536@g5.osdl.org> (raw)
In-Reply-To: <7vu0j44xi4.fsf@assigned-by-dhcp.cox.net>



On Fri, 8 Jul 2005, Junio C Hamano wrote:
>
> If it is fed a commit with more than one leading blank lines,
> the sed scripts git-format-patch-script used looped forever.
> This patch fixes it.

How about using "git-stripspace"? That's what it's there for. It strips
whitespace from the end of lines, from the beginning, and from the end. It
also removes multiple consecutive whitespace lines from within the body of
the message - which might turn some people off, but I use that same thing
when I do my automated email commits, so if you don't strip those lines
from the email, they _will_ get stripped at commit time, so..

"git-stripspace" also doesn't get confused by non-empty lines that have 
spaces in them, like your script seems to be (ie /^$/ won't match a line 
that has a space on it).

		Linus

  reply	other threads:[~2005-07-09  1:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-09  0:46 [PATCH] format-patch: fix skipping of blank-lines Junio C Hamano
2005-07-09  1:42 ` Linus Torvalds [this message]
2005-07-09  2:27   ` [PATCH] format-patch: fix skipping of blank-lines (take 2) 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=Pine.LNX.4.58.0507081838560.17536@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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