Detect systems that have no user name set in GECOS, and also don't have user.name set in git config, and put in a workaround so that commits to the git-annex branch (and the assistant) will still succeed despite git not liking the system configuration.

This commit is contained in:
Joey Hess 2013-04-22 15:36:34 -04:00
parent 8861e270be
commit 9cb223a8b3
6 changed files with 24 additions and 10 deletions

View file

@ -24,6 +24,7 @@ import qualified Git
import qualified Git.AutoCorrect
import Annex.Content
import Annex.Ssh
import Annex.Environment
import Command
type Params = [String]
@ -39,6 +40,7 @@ dispatch fuzzyok allargs allcmds commonoptions fields header getgitrepo = do
Right g -> do
state <- Annex.new g
(actions, state') <- Annex.run state $ do
checkEnvironment
checkfuzzy
forM_ fields $ uncurry Annex.setField
sequence_ flags