Re: [PATCH/RFC 3/3] ls-files/dir: use is_git_repo to detect submodules

2015-12-07 Thread Jeff King
On Sun, Dec 06, 2015 at 05:59:26PM +0100, Andreas Krey wrote: > On Sat, 05 Dec 2015 02:37:44 +, Jeff King wrote: > ... > > Hrm. Weird. You'd think it would break with the existing code if I do > > this, then: > > > ... > > - (cd a/b/c; git init) && > > + (cd a/b/c; git

Re: [PATCH/RFC 3/3] ls-files/dir: use is_git_repo to detect submodules

2015-12-06 Thread Andreas Krey
On Sat, 05 Dec 2015 02:37:44 +, Jeff King wrote: ... > Hrm. Weird. You'd think it would break with the existing code if I do > this, then: > ... > - (cd a/b/c; git init) && > + (cd a/b/c; git init && git commit --allow-empty -m foo) && > git config

Re: [PATCH/RFC 3/3] ls-files/dir: use is_git_repo to detect submodules

2015-12-04 Thread Jeff King
On Fri, Dec 04, 2015 at 07:15:17PM +0100, Andreas Krey wrote: > Using resolve_gitlink_ref to check for submodules > creates submodule list entries even when it isn't > one, and causes O(n^2) runtime behaviour in repos > with many untracked directories. > > Use is_git_repo instead for detection.