On Mon, Sep 3, 2012 at 8:42 PM, Angelo Borsotti
<angelo.borso...@gmail.com> wrote:
> $ git checkout 94d8 -- *
> $ ls
> f1
>
> Note that the work directory is empty when the checkout is done, and
> that the checkout restores f1
> in it, a file that is not denoted by the * pathspec.

I think in this case '*' remains unexpanded by the shell. Which means
it is still a pathspec to checkout (iow equivalent to "git checkout
94d8 -- '*'"). Checkout in turns matches the pathspec '*' against the
tree and decides to restore 'fl'.

It's confusing but I don't think there's much we can do about it.

> I guess that this is the intended behaviour, and that the man page
> should be updated to tell exactly
> what files git restores.
-- 
Duy
--
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