CLone form git.

@throws \Cz\Git\GitException
@return $this;
433944
private function cloneFromGit()
    {
        $this->tmpDirectory = tmpPath().'/'.time();
        GitRepository::cloneRepository($this->gitURL, $this->tmpDirectory);
        return $this;
    }
1361789
public function cloneProxy(): ProxyInterface
    {
        //Clone states stack
        if (!empty($this->states)) {
            $clonedStatesArray = [];
            foreach ($this->states as $key => $state) {
                //Clone each stated class instance
                $clonedState = clone $state;
                //Update new stack
                $clonedStatesArray[$key] = $clonedState;
            }
            $this->states = $clonedStatesArray;
        }

        //Enabling states
        if (!empty($this->activesStates)) {
            $activesStates = \array_keys($this->activesStates);
            $this->activesStates = [];
            foreach ($activesStates as $stateName) {
                $this->enableState($stateName);
            }
        }

        return $this;
    }
638683
function clone() {
		Release.chdir( Release.dir.base );
		Release.dir.dist = Release.dir.base + "/dist";

		console.log( "Using distribution repo: ", distRemote );
		Release.exec( "git clone " + distRemote + " " + Release.dir.dist,
			"Error cloning repo." );

		// Distribution always works on master
		Release.chdir( Release.dir.dist );
		Release.exec( "git checkout master", "Error checking out branch." );
		console.log();
	}
867331
public function withProtocolVersion($version)
    {
        if ($this->getProtocolVersion() === $version) {
            return $this;
        }

        $newInstance = clone $this;
        $newInstance->setProtocolVersion($version);
        return $newInstance;
    }
345976
public function commit()
    {
        $res = null;

        if ($this->transLevel == 0) {
            $this->cleanAfterCommit();
            throw $this->createException('Commit without transaction');
        }

        if (!empty($this->transLevelRolledBack[$this->transLevel])) {
            $this->transLevel--;
            return $this;
        }

        if (empty($this->pendingTransactionBegin[$this->transLevel])) {
            $this->dbTransLevel--;

            if ($this->dbTransLevel == 0) {
                $res = pg_query($this->pgConn, 'commit');
            }

            if ($res === false) {
                $this->cleanAfterCommit();
                throw $this->createException();
            }
        }

        $this->afterCommit();
        $this->transLevel--;

        return $this;
    }
99890
def save_form(self, request, form, change):
        
        name = form.cleaned_data['name']
        origin_url = form.cleaned_data['origin_url']
        res = ClonedRepo(name=name, origin=origin_url)
        LOG.info("New repo form produced %s" % str(res))

        form.save(commit=False)
        return res
842783
public function copy(): self
    {
        $stockMovement = new static();
        $stockMovement
            ->setQuantity($this->getQuantity())
            ->setComplaint($this->isComplaint())
            ->setReference($this->getReference())
            ->setRetailPrice($this->getRetailPrice())
            ->setPrice($this->getPrice())
            ->setVatPercentage($this->getVatPercentage())
            ->setType($this->getType())
            ->setProduct($this->getProduct())
            ->setOrderLine($this->getOrderLine())
            ->setOrderLineRemoved($this->isOrderLineRemoved())
        ;

        return $stockMovement;
    }
872969
public function newInstance()
    {
        if ($this->prototype === null) {
            $this->prototype = unserialize(sprintf('O:%d:"%s":0:{}', strlen($this->name), $this->name));
        }

        return clone $this->prototype;
    }
167315
public function duplicateCollection()
    {
        $app = Application::getFacadeApplication();
        $cloner = $app->make(Cloner::class);
        $clonerOptions = $app->build(ClonerOptions::class)->setKeepOriginalAuthor(true);
        $newCollection = $cloner->cloneCollection($this, $clonerOptions);

        return $newCollection;
    }
1060974
def clone_repo(pkg, dest, repo, repo_dest, branch):
    """"""
    git(['clone', '--recursive', '-b', branch, repo, repo_dest])
58185
public function getNewFormRequestMeta($clone = TRUE) {
    if (!isset($this->newFormRequestMeta)) {
      $this->newFormRequestMeta = new RequestMeta(\Psc\Net\HTTP\Request::GET,
                                               $this->constructUrl(array($this->getEntityNamePlural(), 'form'))
                                              );
    }
    
    if ($clone) {
      return clone $this->newFormRequestMeta;
    } else {
      return $this->newFormRequestMeta;
    }
  }
1361588
function commit() {
		$this->savepoint--;

		if ($this->savepoint == 0) {
			$this->dbh->commit();
		}
		else { // not finished with transaction yet
			$this->dbh->exec('RELEASE SAVEPOINT save'.$this->savepoint);
		}

		return $this;
	}
655110
public function merge()
    {
        $cleaned_stack = $this->cleanStack($this->get(), 'path');
        if (!empty($cleaned_stack)) {
            $this->addMerged(
                $this->mergeStack($this->extractFromStack($cleaned_stack, 'path'))
            );
        }
        return $this;
    }
554027
public function copy()
	{
		$view = $this->getView();

		$view->boughtData = $this->toArray( $view->item, true );
		$view->boughtBody = '';

		foreach( $this->getSubClients() as $client ) {
			$view->boughtBody .= $client->copy();
		}

		return $this->render( $view );
	}
1263800
public function refresh() : self {
      $string = $this->assemble();
      $this->cleanCollection();

      $tokens = Helper::getTokensFromString($string);
      $this->setItems($tokens);

      $this->rewind();
      return $this;
    }
1100204
function Copy()
     {
         return new Date($this->Day(), $this->Month(), $this->Year(),
                         $this->Hour(), $this->Minute(), $this->Second());
     }
568441
protected function cloneByHttp(Builder $builder, $cloneTo)
    {
        $cmd = 'git clone --recursive ';

        $depth = $builder->getConfig('clone_depth');

        if (!is_null($depth)) {
            $cmd .= ' --depth ' . intval($depth) . ' ';
        }

        $cmd .= ' -b "%s" "%s" "%s"';
        $success = $builder->executeCommand($cmd, $this->getBranch(), $this->getCloneUrl(), $cloneTo);

        if ($success) {
            $success = $this->postCloneSetup($builder, $cloneTo);
        }

        return $success;
    }