mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 09:00:18 +01:00 
			
		
		
		
	SCM: Git clone performance
Via: - http://stackoverflow.com/questions/1778088/how-to-clone-a-single-branch-in-git - http://stackoverflow.com/questions/6941889/is-git-clone-depth-1-shallow-clone-more-useful-than-it-makes-out - http://git-scm.com/docs/git-clone
This commit is contained in:
		
							parent
							
								
									97e9fde28a
								
							
						
					
					
						commit
						b066368a50
					
				@ -64,16 +64,12 @@ class CloneTask extends AbstractTask
 | 
				
			|||||||
        $this->runCommandLocal('mkdir -p ' . $this->source['temporal']);
 | 
					        $this->runCommandLocal('mkdir -p ' . $this->source['temporal']);
 | 
				
			||||||
        switch ($this->source['type']) {
 | 
					        switch ($this->source['type']) {
 | 
				
			||||||
            case 'git':
 | 
					            case 'git':
 | 
				
			||||||
                // Clone Repo
 | 
					                // Fast clone Repo form Branch
 | 
				
			||||||
                $command = 'cd ' . $this->source['temporal'] . ' ; '
 | 
					                $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);
 | 
					                $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']);
 | 
					                $this->getConfig()->setFrom($this->source['temporal']);
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user