Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Junio C Hamano
Stefan Beller writes: > So for now I would send the performance regressing flip of > IS_GITLINK and match_pathspec targeting 2.7 and then add a > --unmatch-ok switch for 2.8 and later? "git submodule $subcommand -- COPYIN\*" that detects that there is no submodule that match the pathspec and err

Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Stefan Beller
On Tue, Mar 22, 2016 at 3:04 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> I was under the impression that we do not want to have this bugfix >> (at least long term) and then I tried to come up with an idea, >> which is both: >> * correct in this case >> * and catches the git submodule i

Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Junio C Hamano
Stefan Beller writes: > I was under the impression that we do not want to have this bugfix > (at least long term) and then I tried to come up with an idea, > which is both: > * correct in this case > * and catches the git submodule init -- 'COPYIN*' case as failure Satisfying both has to be impo

Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Stefan Beller
On Tue, Mar 22, 2016 at 2:38 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> I do not think that buys us much. You have already shown how to >>> implement "filter first and then pathspec match" if a caller >>> wants to (which turned out to be a regression in this case, but >>> that is be

Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Junio C Hamano
Stefan Beller writes: >> I do not think that buys us much. You have already shown how to >> implement "filter first and then pathspec match" if a caller >> wants to (which turned out to be a regression in this case, but >> that is besides the point). > > And by including this filtering into the

Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Stefan Beller
On Tue, Mar 22, 2016 at 1:06 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Maybe we can also special case the "force" argument only here for >> Cedars use case. ("git submodule deinit ." complains because >> there are no further submodules, but -f solves the complaint?) > > I think that

Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Junio C Hamano
Stefan Beller writes: > Maybe we can also special case the "force" argument only here for > Cedars use case. ("git submodule deinit ." complains because > there are no further submodules, but -f solves the complaint?) I think that would have been the most sensible thing to do when we were addin

Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Stefan Beller
On Tue, Mar 22, 2016 at 11:53 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> In 74703a1e4d (2015-09-02, submodule: rewrite `module_list` shell >> function in C), "submodule deinit ." was broken. >> >> The original module_list accepted '.' as a pathspec just fine, as it >> was using >> >>

Re: [PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Junio C Hamano
Stefan Beller writes: > In 74703a1e4d (2015-09-02, submodule: rewrite `module_list` shell > function in C), "submodule deinit ." was broken. > > The original module_list accepted '.' as a pathspec just fine, as it > was using > > git ls-files -z --error-unmatch --stage -- "$@" || { custom filte

[PATCH] submodule helper: accept '.' for repositories with no submodules

2016-03-22 Thread Stefan Beller
In 74703a1e4d (2015-09-02, submodule: rewrite `module_list` shell function in C), "submodule deinit ." was broken. The original module_list accepted '.' as a pathspec just fine, as it was using git ls-files -z --error-unmatch --stage -- "$@" || { custom filtering} and git ls-files doesn't make