On Tue, Mar 17 2015 at 02:49:48 AM, Junio C Hamano <gits...@pobox.com> wrote:
> Junio C Hamano <gits...@pobox.com> writes:
>
>       if (try to see if it is a revision or regvision range) {
>               /* if failed ... */
>               if (starts with '-') {
>                       do the option thing;
>                         continue;
>               }
>               /* args must be pathspecs from here on */
>                 check the  '--' disambiguation;
>                 add pathspec to prune-data;
>       } else {
>               got_rev_arg = 1;
>       }
>
> but I didn't trace the logic myself to see if that would work.

You're right. I was actually going to try and check all possible
suffixes of "-" but your solution saves us from doing that, and it
didn't break any tests.

On a similar note, would it be relevant to add similar changes to
rev-parse? While trying to write some test, I noticed that rev-parse
doesn't support "-". If I'm not mistaking it assumes everything that starts 
with "-"
must be an option. But since it is a plumbing tool I don't know if it
would be worth it or even an improvement.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to