From: Andrew Wong Date: Mon, 02 Feb 2015 16:58:33 GMT Subject: "git status" should warn/error when it cannot lists a directory Message-ID: When "git status" recurses a directory that isn't readable (but executable), it should print out a warning/error. Currently, if there are untracked files in these directories, git wouldn't be able to discover them. Ideally, "git status" should return a non-zero exit code as well. The problem seems to be In read_directory_recursive() from dir.c. When opendir() returns null, we continue on ignoring any error. Is there a scenario where returning null is expected? We can simply call perror() here, but it would be nice if we can propagate the error to the exit code too. How would we do that?