all commands building except for assistant
also, changed ConfigValue to a newtype, and moved it into Git.Config.
This commit is contained in:
		
					parent
					
						
							
								718fa83da6
							
						
					
				
			
			
				commit
				
					
						c20f4704a7
					
				
			
		
					 40 changed files with 187 additions and 174 deletions
				
			
		| 
						 | 
				
			
			@ -203,9 +203,9 @@ extractGitConfig r = GitConfig
 | 
			
		|||
	getbool k d = fromMaybe d $ getmaybebool k
 | 
			
		||||
	getmaybebool k = Git.Config.isTrue' =<< getmaybe' k
 | 
			
		||||
	getmayberead k = readish =<< getmaybe k
 | 
			
		||||
	getmaybe = fmap decodeBS' . getmaybe'
 | 
			
		||||
	getmaybe = fmap fromConfigValue . getmaybe'
 | 
			
		||||
	getmaybe' k = Git.Config.getMaybe k r
 | 
			
		||||
	getlist k = map decodeBS' $ Git.Config.getList k r
 | 
			
		||||
	getlist k = map fromConfigValue $ Git.Config.getList k r
 | 
			
		||||
	getwords k = fromMaybe [] $ words <$> getmaybe k
 | 
			
		||||
 | 
			
		||||
	configurable d Nothing = DefaultConfig d
 | 
			
		||||
| 
						 | 
				
			
			@ -345,7 +345,7 @@ extractRemoteGitConfig r remotename = do
 | 
			
		|||
	getbool k d = fromMaybe d $ getmaybebool k
 | 
			
		||||
	getmaybebool k = Git.Config.isTrue' =<< getmaybe' k
 | 
			
		||||
	getmayberead k = readish =<< getmaybe k
 | 
			
		||||
	getmaybe = fmap decodeBS' . getmaybe'
 | 
			
		||||
	getmaybe = fmap fromConfigValue . getmaybe'
 | 
			
		||||
	getmaybe' k = mplus (Git.Config.getMaybe (key k) r)
 | 
			
		||||
		(Git.Config.getMaybe (remotekey k) r)
 | 
			
		||||
	getoptions k = fromMaybe [] $ words <$> getmaybe k
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue