Thread (12 messages) flat view 12 messages, 3 authors, 2016-06-15

Re: [PATCH 2/2] filter-branch: use git-sh-setup's ident parsing functions

From: Jeff King <hidden>
Date: 2016-06-15 22:55:04
Subsystem: the rest · Maintainer: Linus Torvalds

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help