git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "git status" should warn/error when it cannot lists a directory
@ 2015-02-02 16:58 Andrew Wong
  2015-02-03  5:36 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Wong @ 2015-02-02 16:58 UTC (permalink / raw)
  To: git@vger.kernel.org

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-03  5:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-02 16:58 "git status" should warn/error when it cannot lists a directory Andrew Wong
2015-02-03  5:36 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).