From: Junio C Hamano Date: Sun, 06 Jun 2010 04:00:38 GMT Subject: Re: What's cooking in git.git (Jun 2010, #01; Wed, 2) Message-ID: <7vaar8yfmh.fsf@alter.siamese.dyndns.org> In-Reply-To: Sverre Rabbelier writes: > No addition to the test suite to catch this in the future? If we had a test like this: test_expect_success 'run resolve' ' ... set up something to merge ... ( unset DIFF; git merge -s resolve ... ) ' it would have caught this particular breakage, but (1) nobody could have anticipated before the problematic patch that $DIFF would be an exported variable that could cause trouble, so nobody could have written it before the $DIFF patch; (2) with the knowledge necessary to write the above test, the $DIFF patch wouldn't have made the misconversion, so it is unreasonable to say that the $DIFF patch should have come with the above test; and (3) having the above test in the test suite may catch exactly the same mistake in git-merge-one-file.sh, but that is not a guarantee that nobody will break another scripted Porcelain that is not triggered in the "resolve" codepath. Other than doing "! git grep -e '$DIFF' 'git-\*.sh'" at the toplevel of the source tree, I don't think it is possible to catch future bugs of this sort.