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

svn ls --search/pattern/glob/case-insensitive [was: svn commit: r1806548 ...]

From: Julian Foad <julianfoad_at_apache.org>
Date: Tue, 29 Aug 2017 11:46:35 +0100

Evgeny Kotkov wrote:
> Bert Huijben <bert_at_qqmail.nl> writes:
>>> As Julian discovered, '--search' as used with 'svn log' is may not suitable
>>> for 'svn ls'. File name matching should be case-sensitive and requires
>>> full patterns just like e.g. the ordinary unix command line 'ls' command.
>>>
>>> Therefore, introduce a separate '--pattern' option for 'svn log' that works
>>> similar to patterns with Unix command line 'ls'. Since the actual matching
>>> already confirms to that, we only need a different option pre-processing.
>>
>> Perhaps we could use --glob, to allow other syntax patterns later?
>>
>> Not sure... perhaps --glob is too technical.
>
> My 2 cents on this would be that having "svn ls --pattern" and "svn log
> --search" which only differ in terms of case sensitivity have a chance of
> being confusing for the users.

I agree that's confusing, even just having two different option names is
confusing.

> Perhaps, a slightly better way would be to keep the case-insensitive behavior
> by default, but add a "--case-sensitive" switch to handle the cases where
> it's required?
>
> That is,
>
> svn ls --search
>
> svn ls --search --case-sensitive

I don't think a case-sensitive mode is necessary. Remember, this is a
user interface. It is to help users find things. It does not attempt to
be a programmatic search tool with all the precision and flexibility of
Unix 'find -name -maxdepth -prune ...'. I expect almost zero use cases
would require case-sensitive matching at this UI level, and that is why
we made 'svn log --search' just be case-insensitive always.

Simplicity and consistency are key.

- Julian
Received on 2017-08-29 12:46:40 CEST

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

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