From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Federico Fissore <federico@fissore.org>
Cc: git@vger.kernel.org
Subject: Re: [bug] .git/hooks/commit-msg.sample test is reversed
Date: Tue, 15 Sep 2015 11:10:59 +0200 [thread overview]
Message-ID: <vpq8u88cajg.fsf@anie.imag.fr> (raw)
In-Reply-To: <55F7DA48.30104@fissore.org> (Federico Fissore's message of "Tue, 15 Sep 2015 10:43:52 +0200")
Federico Fissore <federico@fissore.org> writes:
> Hello everyone
>
> In file commit-msg.sample, grep test is reversed. It greps
> '^Signed-off-by: '
> while it should grep
> 'Signed-off-by: '
>
> If you run the sample against attached file, it won't complain. Remove
> the ^ and it will work as expected
I think the test is correct.
In grep, ^ can have two meanings:
'^foo' means "foo at the start of a line"
'[^abc]' means "one character but not a, b or c"
The Signed-off-by: trailer is meant to be at the start of a line, hence
the ^.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
prev parent reply other threads:[~2015-09-15 9:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 8:43 [bug] .git/hooks/commit-msg.sample test is reversed Federico Fissore
2015-09-15 9:10 ` Matthieu Moy [this message]
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=vpq8u88cajg.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=federico@fissore.org \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.