git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 5/5] Skip blank lines when matching <commit>^{/foo}
Date: Sat, 2 Jul 2016 08:34:29 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1607020826530.12947@virtualbox> (raw)
In-Reply-To: <xmqqh9cb1ub0.fsf@gitster.mtv.corp.google.com>

Hi Junio,

On Wed, 29 Jun 2016, Junio C Hamano wrote:

> Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> 
> > When trying to match a pattern in the commit subject, simply skip leading
> > blank lines in the commit message. This is consistent with the
> > pretty-printing machinery: it silently ignores leading blank lines in the
> > commit object's body.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> 
> Hmm.
> 
> I just tried
> 
>     $ git commit -s -m '  pull: fast-forward "pull --rebase=true"'
> 
> expecting that ":/^  pull:" would find it ;-)

This patch would try to address a different concern, though:

	git write-object -w --stdin <<-EOF
	tree $(git rev-parse HEAD:)
	parent $(git rev-parse HEAD)
	author B O Gus <bo@gus.com> 1234567890 +0000
	committer F A Ke <fa@ke.org> 1234567890 +0000


	There are two blank lines before the subject
	EOF

It is not about leading whitespace in the commit subject, but about blank
lines before it.

Granted, our current tools do not generate such commit objects, but we
accept them, and already handle them in some places.

> Also 4/5 is another different class of true bugfix, I would suspect,
> so let's take it on a separate topic that can be merged down to
> older maintainance tracks.

Sure!

Thanks,
Dscho

  reply	other threads:[~2016-07-02  6:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 14:14 [PATCH 0/5] Use skip_blank_lines() for more commit messages Johannes Schindelin
2016-06-29 14:14 ` [PATCH 1/5] commit -C: skip blank lines at the beginning of the message Johannes Schindelin
2016-06-29 21:59   ` Junio C Hamano
2016-06-29 14:14 ` [PATCH 2/5] sequencer: use skip_blank_lines() to find the commit subject Johannes Schindelin
2016-06-29 22:03   ` Junio C Hamano
2016-06-29 14:14 ` [PATCH 3/5] reset --hard: skip blank lines when reporting " Johannes Schindelin
2016-06-29 14:14 ` [PATCH 4/5] commit -S: avoid invalid pointer with empty message Johannes Schindelin
2016-06-29 14:15 ` [PATCH 5/5] Skip blank lines when matching <commit>^{/foo} Johannes Schindelin
2016-06-29 22:53   ` Junio C Hamano
2016-07-02  6:34     ` Johannes Schindelin [this message]
2016-06-29 17:51 ` [PATCH 0/5] Use skip_blank_lines() for more commit messages 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=alpine.DEB.2.20.1607020826530.12947@virtualbox \
    --to=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).