Junio C Hamano wrote: > On Mon, Oct 13, 2014 at 2:31 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: >> It could segfault after producing the good output, but sure, >> count-objects code doesn't change very often. > > "Doesn't change very often" is not the issue. Here we are not testing > if it can count correctly without crashing, which *is* the real reason > why it is perfectly fine to use $(git count-objects | sed ...) pattern here. > > There of course should be a test for count-objects to make sure it > counts correctly without crashing. That also makes sense, but it is a pretty big change from the general strategy used in git tests today. Currently they use &&-chaining to check the status from git commands used along the way. That way, unrelated bugs in git commands that are only used incidentally get caught, as long as they cause the command to crash. This has helped me in the past to find weird bugs early when they cause some particular command to crash on some platforms. Sometimes they are races that show up on more popular platforms later. Jonathan -- 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