{"thread":{"id":"26341","subject":"[PATCH] tests: sanitize more git environment variables","startedAt":"2011-01-26T20:33:32Z","lastAt":"2011-01-27T00:31:36Z","messageCount":4,"participants":["Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"159906","messageId":"20110126203331.GA27478@sigill.intra.peff.net","threadId":"26341","inReplyTo":null,"subject":"[PATCH] tests: sanitize more git environment variables","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-01-26T20:33:32Z","receivedAt":"2011-01-26T20:33:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"These variables should generally not be set in one's\nenvironment, but they do get set by rebase, which means\ndoing an interactive rebase like:\n\n  pick abcd1234 foo\n  exec make test\n\nwill cause false negatives in the test suite.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/test-lib.sh |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 42f2f14..0fdc541 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -70,6 +70,9 @@ unset GIT_NOTES_REF\n unset GIT_NOTES_DISPLAY_REF\n unset GIT_NOTES_REWRITE_REF\n unset GIT_NOTES_REWRITE_MODE\n+unset GIT_REFLOG_ACTION\n+unset GIT_CHERRY_PICK_HELP\n+unset GIT_QUIET\n GIT_MERGE_VERBOSITY=5\n export GIT_MERGE_VERBOSITY\n export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME\n-- \n1.7.0.9.7.g36b59\n"},{"id":"159907","messageId":"20110126203444.GB27478@sigill.intra.peff.net","threadId":"26341","inReplyTo":"20110126203331.GA27478@sigill.intra.peff.net","subject":"Re: [PATCH] tests: sanitize more git environment variables","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-01-26T20:34:44Z","receivedAt":"2011-01-26T20:34:44Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 26, 2011 at 03:33:32PM -0500, Jeff King wrote:\n\n> These variables should generally not be set in one's\n> environment, but they do get set by rebase, which means\n> doing an interactive rebase like:\n> \n>   pick abcd1234 foo\n>   exec make test\n> \n> will cause false negatives in the test suite.\n\nOr I guess false positives, depending on your definition of positive and\nnegative. I.e., tests will fail when they shouldn't. :)\n\n-Peff\n"},{"id":"159909","messageId":"7v39ofl7ki.fsf@alter.siamese.dyndns.org","threadId":"26341","inReplyTo":"20110126203331.GA27478@sigill.intra.peff.net","subject":"Re: [PATCH] tests: sanitize more git environment variables","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-01-26T20:43:25Z","receivedAt":"2011-01-26T20:43:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> These variables should generally not be set in one's\n> environment, but they do get set by rebase, which means\n> doing an interactive rebase like:\n>\n>   pick abcd1234 foo\n>   exec make test\n>\n> will cause false negatives in the test suite.\n\nCute.  Thanks.\n"},{"id":"159935","messageId":"20110127003136.GA5394@sigill.intra.peff.net","threadId":"26341","inReplyTo":"7v39ofl7ki.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] tests: sanitize more git environment variables","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-01-27T00:31:36Z","receivedAt":"2011-01-27T00:31:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 26, 2011 at 12:43:25PM -0800, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > These variables should generally not be set in one's\n> > environment, but they do get set by rebase, which means\n> > doing an interactive rebase like:\n> >\n> >   pick abcd1234 foo\n> >   exec make test\n> >\n> > will cause false negatives in the test suite.\n> \n> Cute.  Thanks.\n\nBTW, for anyone interested, I am using this with the following script:\n\n-- >8 --\n#!/bin/sh\nupstream=`git rev-parse --symbolic-full-name \"$1@{u}\" >/dev/null 2>&1`\nGIT_EDITOR='sed -i \"/^pick .*/aexec make -j8 test\"' \\\n\tgit rebase -i \"${upstream:-origin}\" $1\n-- 8< --\n\nwhich is a convenient way of testing each commit in a patch series\nbefore submitting it upstream (and it stops on test failure so you can\nfix up that commit).\n\nYou can drop it in your PATH as \"git-test\" and run \"git test\" or \"git\ntest <branch>\".\n\n-Peff\n"}]}