On Sun, Feb 14, 2010 at 10:51:47PM -0500, Gabriel Filion wrote: > When sourcing git-sh-setup after having set NONGIT_OK, calling the > function require_work_tree while outside of a git repository shows a > syntax error. > > This is caused by the call to "git rev-parse --is-inside-work-tree" > printing a sentence when it is called outside of a git repository. > Relying on the return code is better. I think your fix is fine, but your analysis is slightly wrong. If we are not in a work tree, the sentence goes to stderr, and nothing goes to stdout (which is what makes "test" unhappy). This is not just a nitpick of your commit message, but I was worried given some other recent discussion that we were accidentally sending that message to stdout, which would be a bug. But we're not. -Peff -- 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