From: Jeff King Date: Thu, 18 Oct 2012 10:26:27 GMT Subject: Re: [PATCH 2/2] filter-branch: use git-sh-setup's ident parsing functions Message-ID: <20121018102627.GA17543@sigill.intra.peff.net> In-Reply-To: <20121018102217.GA17332@sigill.intra.peff.net> On Thu, Oct 18, 2012 at 06:22:17AM -0400, Jeff King wrote: > Hrm. We _do_ test this in t7003. Weirder, if I instrument filter-branch > like this: > [...] > and run t7003, it shows that the variable is properly exported to the > sub-process! But I can't seem to figure out why. Confused... Oh, I see. The variables are already exported by test-lib.sh. You can see the breakage with: diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index 4d13e10..1e7a209 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -167,10 +167,11 @@ test_expect_success 'author information is preserved' ' test_tick && GIT_AUTHOR_NAME="B V Uips" git commit -m bvuips && git branch preserved-author && - git filter-branch -f --msg-filter "cat; \ + (sane_unset GIT_AUTHOR_NAME && + git filter-branch -f --msg-filter "cat; \ test \$GIT_COMMIT != $(git rev-parse master) || \ echo Hallo" \ - preserved-author && + preserved-author) && test 1 = $(git rev-list --author="B V Uips" preserved-author | wc -l) ' -Peff