diff options
author | Jeff King <peff@peff.net> | 2012-11-15 04:33:40 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-11-16 05:47:24 +0400 |
commit | 09feffb633d9e27fa2f3b96ff7c367baa3164ce0 (patch) | |
tree | 0497f1082d30099a7a2b5410e98e1c98b80e8965 /t/t7502-commit.sh | |
parent | bdccd3c1fb261dc6d4aaf9fae446eea7136b76e2 (diff) |
t7502: factor out autoident prerequisite
t7502 checks the behavior of commit when we can and cannot
determine a valid committer ident. Let's move that into
test-lib as a lazy prerequisite so other scripts can use it.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-x | t/t7502-commit.sh | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index deb187eb7b..1a5cb6983c 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -243,16 +243,6 @@ test_expect_success 'message shows author when it is not equal to committer' ' .git/COMMIT_EDITMSG ' -test_expect_success 'setup auto-ident prerequisite' ' - if (sane_unset GIT_COMMITTER_EMAIL && - sane_unset GIT_COMMITTER_NAME && - git var GIT_COMMITTER_IDENT); then - test_set_prereq AUTOIDENT - else - test_set_prereq NOAUTOIDENT - fi -' - test_expect_success AUTOIDENT 'message shows committer when it is automatic' ' echo >>negative && @@ -271,7 +261,7 @@ echo editor started > "$(pwd)/.git/result" exit 0 EOF -test_expect_success NOAUTOIDENT 'do not fire editor when committer is bogus' ' +test_expect_success !AUTOIDENT 'do not fire editor when committer is bogus' ' >.git/result >expect && |