Re: [PATCH 2/2] resolve_gitlink_ref: ignore non-repository paths

2016-01-22 Thread Jeff King
On Fri, Jan 22, 2016 at 02:36:54PM -0800, Stefan Beller wrote: > Impressive performance improvements. :) "Accidentally quadratic" bugs are some of my favorites, because it's usually easy to show off the results. Of course, the repo in p7300 is pretty ridiculous, and most people won't see any spee

Re: [PATCH 2/2] resolve_gitlink_ref: ignore non-repository paths

2016-01-22 Thread Stefan Beller
Impressive performance improvements. :) On Fri, Jan 22, 2016 at 2:31 PM, Jeff King wrote: > BTW, what if you have > precious content in a ".git" file? I'd kindly ask to use a different version control in that case. Q: What can you use Git for? A: Everything including version control, backup,

Re: [PATCH 2/2] resolve_gitlink_ref: ignore non-repository paths

2016-01-22 Thread Jeff King
On Fri, Jan 22, 2016 at 05:29:30PM -0500, Jeff King wrote: > diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh > index 88be904..c525656 100755 > --- a/t/t3000-ls-files-others.sh > +++ b/t/t3000-ls-files-others.sh > @@ -65,6 +65,13 @@ test_expect_success '--no-empty-directory hid

[PATCH 2/2] resolve_gitlink_ref: ignore non-repository paths

2016-01-22 Thread Jeff King
When we want to look up a submodule ref, we use get_ref_cache(path) to find or auto-create its ref cache. But if we feed a path that isn't actually a git repository, we blindly create the ref cache, and then may die deeper in the code when we try to access it. This is a problem because many callers