mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Merge pull request #125 from xboston/patch-1
SCM: Git clone performance
This commit is contained in:
		
						commit
						8524de7490
					
				@ -64,16 +64,12 @@ class CloneTask extends AbstractTask
 | 
			
		||||
        $this->runCommandLocal('mkdir -p ' . $this->source['temporal']);
 | 
			
		||||
        switch ($this->source['type']) {
 | 
			
		||||
            case 'git':
 | 
			
		||||
                // Clone Repo
 | 
			
		||||
                // Fast clone Repo form Branch
 | 
			
		||||
                $command = 'cd ' . $this->source['temporal'] . ' ; '
 | 
			
		||||
                         . 'git clone ' . $this->source['repository'] . ' . ';
 | 
			
		||||
                    . 'git clone --depth 1 -q -b ' . $this->source['from']
 | 
			
		||||
                    . ' ' . $this->source['repository'] . ' . ';
 | 
			
		||||
                $result = $this->runCommandLocal($command);
 | 
			
		||||
 | 
			
		||||
                // Checkout Branch
 | 
			
		||||
                $command = 'cd ' . $this->source['temporal'] . ' ; '
 | 
			
		||||
                         . 'git checkout ' . $this->source['from'];
 | 
			
		||||
                $result = $result && $this->runCommandLocal($command);
 | 
			
		||||
 | 
			
		||||
                $this->getConfig()->setFrom($this->source['temporal']);
 | 
			
		||||
                break;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user