Re: [PATCH] tests: sanitize more git environment variables
- From
Jeff King <peff@peff.net>
- Date
- Jan 27, 2011, 00:31 UTC
- Message-ID
- <20110127003136.GA5394@sigill.intra.peff.net>
- In-Reply-To
- <7v39ofl7ki.fsf@alter.siamese.dyndns.org>
On Wed, Jan 26, 2011 at 12:43:25PM -0800, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes: > > > These variables should generally not be set in one's > > environment, but they do get set by rebase, which means > > doing an interactive rebase like: > > > > pick abcd1234 foo > > exec make test > > > > will cause false negatives in the test suite. > > Cute. Thanks.
BTW, for anyone interested, I am using this with the following script:
-- >8 --
#!/bin/sh
upstream=`git rev-parse --symbolic-full-name "$1@{u}" >/dev/null 2>&1`
GIT_EDITOR='sed -i "/^pick .*/aexec make -j8 test"' \
git rebase -i "${upstream:-origin}" $1
-- 8< --which is a convenient way of testing each commit in a patch series before submitting it upstream (and it stops on test failure so you can fix up that commit).
You can drop it in your PATH as "git-test" and run "git test" or "git test <branch>".
-Peff