Re: [PATCH 04/19] reset: don't allow git reset -- $pathspec in bare repo

2013-01-10 Thread Martin von Zweigbergk
On Wed, Jan 9, 2013 at 11:32 AM, Junio C Hamano gits...@pobox.com wrote: Martin von Zweigbergk martinv...@gmail.com writes: --- builtin/reset.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) With the patch that does not have any explicit check for bareness nor new error

Re: [PATCH 04/19] reset: don't allow git reset -- $pathspec in bare repo

2013-01-10 Thread Junio C Hamano
Martin von Zweigbergk martinv...@gmail.com writes: ... Fix by moving the branching point after the check. OK, that is what I missed. We have an existing check for mixed reset, which was originally meant to handle case without any pathspec but can use the same error condition (i.e.

[PATCH 04/19] reset: don't allow git reset -- $pathspec in bare repo

2013-01-09 Thread Martin von Zweigbergk
--- builtin/reset.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index 045c960..664fad9 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -295,8 +295,6 @@ int cmd_reset(int argc, const char **argv, const char *prefix)

Re: [PATCH 04/19] reset: don't allow git reset -- $pathspec in bare repo

2013-01-09 Thread Junio C Hamano
Martin von Zweigbergk martinv...@gmail.com writes: --- builtin/reset.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) With the patch that does not have any explicit check for bareness nor new error message to scold user with, it is rather hard to tell what is going on, without