From: Junio C Hamano <gitster@pobox.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org, trast@student.ethz.ch
Subject: Re: [PATCH] gitignore: warn about pointless syntax
Date: Mon, 09 Jan 2012 22:01:06 -0800 [thread overview]
Message-ID: <7vd3asayfx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.2.01.1201100639340.11534@frira.zrqbmnf.qr> (Jan Engelhardt's message of "Tue, 10 Jan 2012 06:42:11 +0100 (CET)")
Jan Engelhardt <jengelh@medozas.de> writes:
> On Monday 2012-01-09 23:33, Jeff King wrote:
>>On Mon, Jan 09, 2012 at 11:43:21AM -0800, Junio C Hamano wrote:
>>
>>>>>+static inline void check_bogus_wildcard(const char *file, const char *p)
>>>>>+{
>>>>>+ if (strstr(p, "**") == NULL)
>>>>>+ return;
>>>>>+ warning(_("Pattern \"%s\" from file \"%s\": Double asterisk does not "
>>>>>+ "have a special meaning and is interpreted just like a single "
>>>>>+ "asterisk.\n"), file, p);
>>
>>You only have to implement proper backslash decoding, so I think it is
>>not as hard as reimplementing fnmatch:
>>[...]
>>
>>That being said, if this is such a commonly-requested feature
>
> Was it actually requested, or did you mean "commonly attempted use"?
>
> As I see it, foo/**/*.o for example is equal to placing "*.o" in
> foo/.gitignore, so the feature is already implemented, just not
> through the syntax people falsely assume it is.
You can either adjust the people, i.e. teach that their "false" assumption
is wrong and the feature they expect is available but not in a way that
they expect.
Or you can adjust the tool to match their expectation.
The point that Peff correctly read between my lines is that in real life,
people are harder to train than tools and often the latter is a better
approach, especially if it does not amount to too much more work than
doing the former.
next prev parent reply other threads:[~2012-01-10 6:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 15:40 gitignore warn about ** submission Jan Engelhardt
2012-01-09 15:40 ` [PATCH] gitignore: warn about pointless syntax Jan Engelhardt
2012-01-09 16:28 ` Jeff King
2012-01-09 19:43 ` Junio C Hamano
2012-01-09 22:33 ` Jeff King
2012-01-10 5:42 ` Jan Engelhardt
2012-01-10 6:01 ` Junio C Hamano [this message]
2012-01-10 7:01 ` Jan Engelhardt
2012-01-10 7:02 ` Jan Engelhardt
2012-01-10 9:44 ` Thomas Rast
2012-01-10 18:51 ` Jeff King
-- strict thread matches above, loose matches on Subject: below --
2012-01-09 11:34 [patch] " Jan Engelhardt
2012-01-09 13:44 ` Thomas Rast
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=7vd3asayfx.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jengelh@medozas.de \
--cc=peff@peff.net \
--cc=trast@student.ethz.ch \
/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).