summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 422b206)
raw | patch | inline | side by side (parent: 422b206)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 4 Jun 2008 01:08:08 +0000 (18:08 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 4 Jun 2008 01:08:08 +0000 (18:08 -0700) |
One particular test wants to check the behaviour of the command
when these variables are not set, but the later tests should have
the reliable committer identity for repeatable tests.
Move the "unset" of the variables inside a subshell in the test
that wants to unset them.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
when these variables are not set, but the later tests should have
the reliable committer identity for repeatable tests.
Move the "unset" of the variables inside a subshell in the test
that wants to unset them.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7502-commit.sh | patch | blob | history |
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 22a13f7aababf43fac0a02b6e9310f74cc6b4f9f..385c8f46e1412cb9d794e4e51912fc0d7725bfac 100755 (executable)
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
rm -f expect.tmp
echo "# Committer:
#" >> expect
-unset GIT_COMMITTER_EMAIL
-unset GIT_COMMITTER_NAME
test_expect_success 'committer is automatic' '
echo >>negative &&
- git commit -e -m "sample"
+ (
+ unset GIT_COMMITTER_EMAIL
+ unset GIT_COMMITTER_NAME
+ # must fail because there is no change
+ test_must_fail git commit -e -m "sample"
+ ) &&
head -n 8 .git/COMMIT_EDITMSG | \
sed "s/^# Committer: .*/# Committer:/" >actual &&
test_cmp expect actual