Move evaluator-specific settings out of libstore
This commit is contained in:
		
							parent
							
								
									c1d445ecec
								
							
						
					
					
						commit
						1672bcd230
					
				
					 7 changed files with 42 additions and 31 deletions
				
			
		| 
						 | 
				
			
			@ -28,7 +28,7 @@ GitInfo exportGit(ref<Store> store, const std::string & uri,
 | 
			
		|||
    std::experimental::optional<std::string> ref, std::string rev,
 | 
			
		||||
    const std::string & name)
 | 
			
		||||
{
 | 
			
		||||
    if (settings.pureEval && rev == "")
 | 
			
		||||
    if (evalSettings.pureEval && rev == "")
 | 
			
		||||
        throw Error("in pure evaluation mode, 'fetchGit' requires a Git revision");
 | 
			
		||||
 | 
			
		||||
    if (!ref && rev == "" && hasPrefix(uri, "/") && pathExists(uri + "/.git")) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,7 @@ std::regex commitHashRegex("^[0-9a-fA-F]{40}$");
 | 
			
		|||
HgInfo exportMercurial(ref<Store> store, const std::string & uri,
 | 
			
		||||
    std::string rev, const std::string & name)
 | 
			
		||||
{
 | 
			
		||||
    if (settings.pureEval && rev == "")
 | 
			
		||||
    if (evalSettings.pureEval && rev == "")
 | 
			
		||||
        throw Error("in pure evaluation mode, 'fetchMercurial' requires a Mercurial revision");
 | 
			
		||||
 | 
			
		||||
    if (rev == "" && hasPrefix(uri, "/") && pathExists(uri + "/.hg")) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue