[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Ignore every file except XX*

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 13 Jun 2020 10:40:40 +0000

Branko Čibej wrote on Sat, 13 Jun 2020 10:16 +00:00:
> On 13.06.2020 12:09, Daniel Shahaf wrote:
> > Branko Čibej wrote on Sat, 13 Jun 2020 09:51 +00:00:
> >> On 13.06.2020 11:15, Daniel Shahaf wrote:
> >>> Daniel Sahlberg wrote on Fri, 12 Jun 2020 21:14 +0200:
> >>>>> Care to move this over to dev@ with a patch?
> >>>>>
> >>>> Will do, it might take a few days.
> >>>>
> >>>> Thanks to the other users for their suggestions but I don't think they'll
> >>>> be general enough for my use case.
> >>> Care to explain why patterns with negated character classes wouldn't work?
> >> There's a difference between saying, "ignore everything except '*.doc'"
> >> and "ignore '*.[^d][^o][^c]'".
> > Did you read my previous message in this thread? If you have, then
> > you've just committed a strawman, and that's unlike you.
> >
> > (And for the record, the complement of «*.doc» is «*[^c]|*[^o]c|*[^d]oc|*[^.]doc|».)
>
> |? There's no such operator in glob patterns.

The pipes were shorthand for writing the disjuncts one per line in the
property value.

[And by the way, that complement is incomplete: it doesn't match "doc",
"oc", and "c".]

> >> You can't get the same result with negated character classes as with
> >> pattrerns.
> > I'm aware of that, and have said so in so many words, but the problem
> > statement was "Ignore everything except XX* and YY*", and that _can_ be
> > achieved with negated patterns.
>
> Well ok, sure, for any concrete pattern you can theoretically construct
> its inverse with negated character classes (assuming an "or" operator
> exists). But it's not always trivial nor practical.

> I think it's worth exploring possible solutions that are also user-
> friendly.

I agree, but I'd still like to hear Daniel's answer to my question.

> > At this point I'd rather wait for Daniel to answer my question and
> > clarify his problem statement.
>
> I rather suspect that XX* and YY* were just general examples, not
> concrete ones.

So do I, but the solution I posted is generalizable, as you know.

Brane, can we just put this thread on hold until Daniel replies? For me
to explain why ruling out a proposed solution without stating a reason
is not best practice would not be a good use of any of our times.
Received on 2020-06-13 12:41:10 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.