fetchGit/fetchMercurial: Don't absolutize paths
This is already done by coerceToString(), provided that the argument is a path (e.g. 'fetchGit ./bla'). It fixes the handling of URLs like git@github.com:owner/repo.git. It breaks 'fetchGit "./bla"', but that was never intended to work anyway and is inconsistent with other builtin functions (e.g. 'readFile "./bla"' fails).
This commit is contained in:
		
							parent
							
								
									b7409c5754
								
							
						
					
					
						commit
						475a0a54a9
					
				
					 2 changed files with 0 additions and 4 deletions
				
			
		| 
						 | 
					@ -219,8 +219,6 @@ static void prim_fetchGit(EvalState & state, const Pos & pos, Value * * args, Va
 | 
				
			||||||
    } else
 | 
					    } else
 | 
				
			||||||
        url = state.coerceToString(pos, *args[0], context, false, false);
 | 
					        url = state.coerceToString(pos, *args[0], context, false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!isUri(url)) url = absPath(url);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // FIXME: git externals probably can be used to bypass the URI
 | 
					    // FIXME: git externals probably can be used to bypass the URI
 | 
				
			||||||
    // whitelist. Ah well.
 | 
					    // whitelist. Ah well.
 | 
				
			||||||
    state.checkURI(url);
 | 
					    state.checkURI(url);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -184,8 +184,6 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
 | 
				
			||||||
    } else
 | 
					    } else
 | 
				
			||||||
        url = state.coerceToString(pos, *args[0], context, false, false);
 | 
					        url = state.coerceToString(pos, *args[0], context, false, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!isUri(url)) url = absPath(url);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // FIXME: git externals probably can be used to bypass the URI
 | 
					    // FIXME: git externals probably can be used to bypass the URI
 | 
				
			||||||
    // whitelist. Ah well.
 | 
					    // whitelist. Ah well.
 | 
				
			||||||
    state.checkURI(url);
 | 
					    state.checkURI(url);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue