From d9d16622b99d9128a5a33d195ed5dc9e3bfd01b7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Sep 2012 15:06:48 -0400 Subject: [PATCH] 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 --- debian/changelog | 3 +++ test.hs | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5f514166fa..b0dd0d24d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 27 Aug 2012 13:27:39 -0400 diff --git a/test.hs b/test.hs index 384d02a716..7e19150674 100644 --- a/test.hs +++ b/test.hs @@ -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 " 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