At 09:22 -0700 06 Oct 2011, Junio C Hamano <gitster@xxxxxxxxx> wrote:
Yeah, after thinking about it a bit more, whenever we see ".git" during the upward discovery process, we should always warn if we know it is _not_ a GIT_DIR before looking for another ".git" at higher levels, as anything in that directory cannot be added. If we cannot tell if it is or is not a GIT_DIR, we should error out---the reason we cannot tell most likely is because we cannot read it, and such a file, if it is not a GIT_DIR, cannot be tracked in the real GIT_DIR at a higher level, and if it is a GIT_DIR, we cannot use it to record updates or inspect existing history.
Yes, I think that sounds like a good idea. That should also solve a related problem that I noticed while checking out the current behaviour.
Currently if the .git directory of a submodule is inaccessible running `git status` from anywhere in the parent repository (including within the submodule) will cause git to recursively call itself until enough resources are used to prevent further forking. I then tried this with the patch from earlier in the thread applied, but with the call to error() changed to call die() instead. With that change it quickly failed with a useful error message.
-- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html