[PATCH 2/2] t4010: match_pathspec_depth() and trailing slash after submodule

2014-01-23 Thread Nguyễn Thái Ngọc Duy
When you do git diff HEAD submodule/, submodule from the index is picked out and match_pathspec_depth() in charge of matching it with the pathspec submodule/. Unlike tree_entry_interesting(), match_pathspec_depth() has no knowledge about entry mode to realize submodule is a directory and treat

Re: [PATCH 2/2] t4010: match_pathspec_depth() and trailing slash after submodule

2014-01-23 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: When you do git diff HEAD submodule/, submodule from the index is picked out and match_pathspec_depth() in charge of matching it with the pathspec submodule/. Is ... is called or something missing at the end of this sentence? Unlike

Re: [PATCH 2/2] t4010: match_pathspec_depth() and trailing slash after submodule

2014-01-23 Thread Jens Lehmann
Am 23.01.2014 22:09, schrieb Junio C Hamano: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: diff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff-pathspec.sh index 15a4912..b54251a 100755 --- a/t/t4010-diff-pathspec.sh +++ b/t/t4010-diff-pathspec.sh @@ -127,4 +127,10 @@ test_expect_success

Re: [PATCH 2/2] t4010: match_pathspec_depth() and trailing slash after submodule

2014-01-23 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: ... But a single trailing '/' does mark submod as a directory, which I think is ok for a submodule. And it makes life easier for the user if we accept that, as shell completion will add it there automatically. OK, that would be annoying. Perhaps the

Re: [PATCH 2/2] t4010: match_pathspec_depth() and trailing slash after submodule

2014-01-23 Thread Duy Nguyen
On Fri, Jan 24, 2014 at 4:38 AM, Junio C Hamano gits...@pobox.com wrote: Jens Lehmann jens.lehm...@web.de writes: ... But a single trailing '/' does mark submod as a directory, which I think is ok for a submodule. And it makes life easier for the user if we accept that, as shell completion