test: Set a lot of git environment variables so testing works in strange environments that normally need git config to set names, etc. Closes: #682351 Thanks, gregor herrmann

This commit is contained in:
Joey Hess 2012-09-06 15:06:48 -04:00
parent 566c6f22bc
commit d9d16622b9
2 changed files with 8 additions and 2 deletions

3
debian/changelog vendored
View file

@ -6,6 +6,9 @@ git-annex (3.20120826) UNRELEASED; urgency=low
and configuring the assistant in a web browser.
* init: If no description is provided for a new repository, one will
automatically be generated, like "joey@gnu:~/foo"
* test: Set a lot of git environment variables so testing works in strange
environments that normally need git config to set names, etc.
Closes: #682351 Thanks, gregor herrmann
-- Joey Hess <joeyh@debian.org> Mon, 27 Aug 2012 13:27:39 -0400

View file

@ -882,8 +882,11 @@ prepare = do
setEnv "PATH" (cwd ++ ":" ++ p) True
setEnv "TOPDIR" cwd True
-- Avoid git complaining if it cannot determine the user's email
-- address.
setEnv "EMAIL" "git-annex test <test@example.com>" True
-- address, or exploding if it doesn't know the user's name.
setEnv "GIT_AUTHOR_EMAIL" "test@example.com" True
setEnv "GIT_AUTHOR_NAME" "git-annex test" True
setEnv "GIT_COMMITTER_EMAIL" "test@example.com" True
setEnv "GIT_COMMITTER_NAME" "git-annex test" True
changeToTmpDir :: FilePath -> IO ()
changeToTmpDir t = do