From: Eric Sunshine <ericsunshine@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Marc Strapetz <marc.strapetz@syntevo.com>
Subject: Re: [PATCH] attr: support quoting pathname patterns in C style
Date: Thu, 04 Nov 2010 18:53:28 -0400 [thread overview]
Message-ID: <4CD33968.4060704@gmail.com> (raw)
In-Reply-To: <1288878944-14066-1-git-send-email-pclouds@gmail.com>
On 11/4/2010 9:55 AM, Nguyễn Thái Ngọc Duy wrote:
> Full pattern must be quoted. So 'pat"t"ern attr' will give exactly
> 'pat"t"ern', not 'pattern'. Also clarify that leading whitespaces are
> not part of the pattern and document comment syntax.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy<pclouds@gmail.com>
> diff --git a/attr.c b/attr.c
> index 6aff695..f3063d8 100644
> --- a/attr.c
> +++ b/attr.c
> name = cp;
> - namelen = strcspn(name, blank);
> + if (*cp == '"') {
> + if (unquote_c_style(&pattern, name,&ep))
> + die("Broken attribute line: %s", line);
The error message is perhaps a bit too generic, indicating only that
_something_ on the line caused a problem. Mentioning that bad quoting of
'name' was at fault would help focus the user's attention where it is
needed.
-- ES
next prev parent reply other threads:[~2010-11-04 22:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 12:24 .gitattributes escape character? Marc Strapetz
2010-11-03 15:47 ` Nguyen Thai Ngoc Duy
2010-11-03 17:13 ` Marc Strapetz
2010-11-03 21:03 ` Kevin Ballard
2010-11-04 13:55 ` [PATCH] attr: support quoting pathname patterns in C style Nguyễn Thái Ngọc Duy
2010-11-04 17:21 ` Sverre Rabbelier
2010-11-04 22:53 ` Eric Sunshine [this message]
2010-11-05 2:02 ` Nguyen Thai Ngoc Duy
2010-11-05 16:58 ` Junio C Hamano
2010-11-05 21:46 ` Kevin Ballard
2010-11-08 18:40 ` Junio C Hamano
2010-11-08 21:56 ` Kevin Ballard
2010-11-09 7:48 ` Johannes Sixt
2010-11-09 8:08 ` Kevin Ballard
2010-11-10 0:07 ` Junio C Hamano
2010-11-10 0:27 ` Kevin Ballard
2010-11-06 8:28 ` Marc Strapetz
2010-11-07 8:05 ` Nguyễn Thái Ngọc Duy
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=4CD33968.4060704@gmail.com \
--to=ericsunshine@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=marc.strapetz@syntevo.com \
--cc=pclouds@gmail.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 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.