summaryrefslogtreecommitdiff
path: root/Annex/Environment.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Environment.hs')
-rw-r--r--Annex/Environment.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Annex/Environment.hs b/Annex/Environment.hs
index f22c5f2d4..4b8d38464 100644
--- a/Annex/Environment.hs
+++ b/Annex/Environment.hs
@@ -56,10 +56,12 @@ checkEnvironmentIO =
#endif
{- Runs an action that commits to the repository, and if it fails,
- - sets user.email to a dummy value and tries the action again. -}
+ - sets user.email and user.name to a dummy value and tries the action again. -}
ensureCommit :: Annex a -> Annex a
ensureCommit a = either retry return =<< tryAnnex a
where
retry _ = do
- setConfig (ConfigKey "user.email") =<< liftIO myUserName
+ name <- liftIO myUserName
+ setConfig (ConfigKey "user.name") name
+ setConfig (ConfigKey "user.email") name
a