Subject: Re: multiple source file extensions

From: Jeff King <[email-masked]>
Date: Fri, 1 May 2015 22:33:21 -0400

On Sat, May 02, 2015 at 09:04:32AM +0700, Duy Nguyen wrote:

> Subject: [PATCH] Avoid the need of "--" when wildcard pathspec is used
> [..]
> This patch modifies the rules a bit by considering any valid (*)
> wildcard pathspec "exist in worktree". The rules become:
> 
>  (1) if an arg is a rev, then it must either exist in worktree or not
>      be a valid wildcard pathspec.
> 
>  (2) else, it either exists in worktree or is a wildcard pathspec
> 
>  (3) else, "--" is required.
> 
> With the new rules, "--" is not needed most of the time when wildcard
> pathspec is involved.

I like it. Since this is a DWIM code path anyway, I don't think it
should be a problem in practice (i.e., if you are trying to do something
crazy like match a literal path that has a '*' in it, you really should
be using "--" in the first place).

-Peff