Re: [PATCH v2 2/2] checkout: proper error message on 'git checkout foo bar --'

2013-09-26 Thread Matthieu Moy
Jonathan Nieder jrnie...@gmail.com writes: (a) rename has_dash_dash here to dash_dash_pos, or (b) put the check in the loop, like so: I agree with (a), but not with (b). I think separating the computation of the position and the diagnosis makes it clearer. I reworked the code a bit, the

Re: [PATCH v2 2/2] checkout: proper error message on 'git checkout foo bar --'

2013-09-25 Thread Jonathan Nieder
Hi, Matthieu Moy wrote: error: pathspec 'foo' did not match any file(s) known to git. error: pathspec 'bar' did not match any file(s) known to git. error: pathspec '--' did not match any file(s) known to git. This patch fixes it by walking through the argument list to find the --, and now